Sends a request to refresh the access token.
Namespace: Nemiro.OAuth.ClientsAssembly: Nemiro.OAuth (in Nemiro.OAuth.dll) Version: 1.9.4.725 (1.9.4.725)
Syntax
Parameters
- accessToken (Optional)
- Type: Nemiro.OAuth AccessToken
May contain an access token, which should be refreshed.
Return Value
Type: AccessTokenExceptions
Exception | Condition |
---|---|
NotSupportedException | Provider does not support refreshing the access token, or the method is not implemented. Use the property SupportRefreshToken, to check the possibility of calling this method. |
AccessTokenException | Access token is not found or is not specified. -or- refresh_token value is empty. |
RequestException | Error during execution of a web request. |
Remarks
If accessToken parameter is not specified, it will use the current access token from the same property of the current class instance.
Token must contain the refresh_token, which was received together with the access token.
In order to Microsoft Live returned the refresh_token, when receiving an access token, you must specify the scope wl.offline_access.
OAuthManager.RegisterClient ( new LiveClient ( "0000000040124265", "6ViSGIbw9N59s5Ndsfz-zaeezlBt62Ep" ) { Scope = "wl.offline_access" } );
See Also