generateSignupUrl method
Generates a sign-up URL.
Request parameters:
callbackUrl
- The callback URL to which the Admin will be redirected
after successfully creating an enterprise. Before redirecting there the
system will add a single query parameter to this URL named
"enterpriseToken" which will contain an opaque token to be used for the
CompleteSignup request. Beware that this means that the URL will be
parsed, the parameter added and then a new URL formatted, i.e. there may
be some minor formatting changes and, more importantly, the URL must be
well-formed so that it can be parsed.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SignupInfo.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<SignupInfo> generateSignupUrl({
core.String? callbackUrl,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (callbackUrl != null) 'callbackUrl': [callbackUrl],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'androidenterprise/v1/enterprises/signupUrl';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return SignupInfo.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}