GetOAuth2AccessToken() публичный статический Метод

Send the request body to the OAuth 2.0 token endpoint to retrieve an access token. When successful, updates the OAuthParameter instance passed as parameter by setting AccessToken, RefreshToken and TokenExpiry.
public static GetOAuth2AccessToken ( Google.GData.Client.OAuth2Parameters parameters, String requestBody ) : void
parameters Google.GData.Client.OAuth2Parameters The OAuth 2.0 parameters
requestBody String The request body to send
Результат void
Пример #1
0
 /// <summary>
 /// Refresh the OAuth 2.0 access token.
 /// When successful, updates the OAuthParameter instance passed as parameter by setting
 /// AccessToken, RefreshToken and TokenExpiry.
 /// </summary>
 /// <param name="parameters">The OAuth 2.0 parameters</param>
 public static void RefreshAccessToken(OAuth2Parameters parameters)
 {
     OAuthBase.GetOAuth2AccessToken(parameters, OAuthBase.GetRefreshAccessTokenRequestBody(parameters));
 }
Пример #2
0
 /// <summary>
 /// Exchanges the user-authorized request token for an OAuth 2.0 access token.
 /// When successful, updates the OAuthParameter instance passed as parameter by setting
 /// AccessToken, RefreshToken and TokenExpiry.
 /// </summary>
 /// <param name="parameters">The OAuth 2.0 parameters</param>
 public static void GetAccessToken(OAuth2Parameters parameters)
 {
     OAuthBase.GetOAuth2AccessToken(parameters, OAuthBase.GetExchangeAccessCodeRequestBody(parameters));
 }