verify method

Future<AssociationSession> verify(
  1. String token, {
  2. String? $fields,
})

Verify an association session after the association callback returns from AdSense signup.

Request parameters:

token - The token returned to the association callback URL.

$fields - Selector specifying which fields to include in a partial response.

Completes with a AssociationSession.

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<AssociationSession> verify(
  core.String token, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'token': [token],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'associationsessions/verify';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return AssociationSession.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}