Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications Interface Reference

Provides OAuth authorization mechanism for Ads services when using Web and Installed application flows. More...

Inheritance diagram for Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications:
Google.Api.Ads.Common.Lib.AdsOAuthProvider Google.Api.Ads.Common.Lib.Configurable Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl Google.Api.Ads.Common.Lib.OAuth2ProviderBase Google.Api.Ads.Common.Lib.OAuth2ProviderForApplications Google.Api.Ads.Common.Lib.OAuth2ProviderForServiceAccounts

Public Member Functions

string GetAuthorizationUrl ()
 Gets the authorization URL. More...
 
bool FetchAccessAndRefreshTokens (string authorizationCode)
 Fetches the access and optionally the refresh token if applicable. More...
 
void RefreshAccessTokenInOfflineMode ()
 Refreshes the access token if offline mode is used. More...
 
void RevokeRefreshToken ()
 Revokes the refresh token if offline mode is used. More...
 
- Public Member Functions inherited from Google.Api.Ads.Common.Lib.AdsOAuthProvider
void RefreshAccessToken ()
 Refreshes the access token if expiring. More...
 
void RefreshAccessTokenIfExpiring ()
 Refreshes the access token if expiring. More...
 
string GetAuthHeader ()
 Gets the OAuth authorization header to be used with HTTP requests. More...
 

Properties

bool IsOffline [get, set]
 Indicates if your application needs to access APIs when the user is not present at the browser. This is defaulted to true. More...
 
string RedirectUri [get, set]
 Gets or sets where the url where the response is sent. This should be a registered redirect uri on the API console. More...
 
string RefreshToken [get, set]
 Gets or sets a token that may be used to obtain a new access token. Refresh tokens are valid until the user revokes access. More...
 
- Properties inherited from Google.Api.Ads.Common.Lib.AdsOAuthProvider
string ClientId [get, set]
 Gets or sets the client that is making the request. This value is obtained from the API console during application registration. More...
 
string ClientSecret [get, set]
 Gets or sets the client secret obtained from the API console during application registration.during application registration. More...
 
string Scope [get, set]
 Gets or sets the API access your application is requesting. This is space delimited. More...
 
string State [get, set]
 Gets or sets a parameter that your application can use for keeping state. The OAuth Authorization Server roundtrips this parameter. More...
 
string TokenType [get]
 Gets the type of token returned by the server. This field will always have the value Bearer for now. More...
 
string AccessToken [get, set]
 Gets or sets the token that can be sent to a Google API for authentication. More...
 
DateTime UpdatedOn [get, set]
 Gets or sets the time at which access token was retrieved. More...
 
int ExpiresIn [get, set]
 Gets the remaining lifetime on the access token. More...
 
OAuthTokensObtainedCallback OnOAuthTokensObtained [get]
 Callback triggered when this provider obtains a new access token or refresh token from the OAuth server. More...
 
- Properties inherited from Google.Api.Ads.Common.Lib.Configurable
AppConfig Config [get]
 Gets the application configuration class for this object. More...
 

Detailed Description

Provides OAuth authorization mechanism for Ads services when using Web and Installed application flows.

Member Function Documentation

bool Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.FetchAccessAndRefreshTokens ( string  authorizationCode)

Fetches the access and optionally the refresh token if applicable.

Parameters
authorizationCodeThe authorization code returned by OAuth server.
Returns
True if the tokens were fetched successfully, false otherwise.

Implemented in Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.

string Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.GetAuthorizationUrl ( )

Gets the authorization URL.

Returns
The authorization url.

Implemented in Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.

void Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.RefreshAccessTokenInOfflineMode ( )

Refreshes the access token if offline mode is used.

Implemented in Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.

void Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.RevokeRefreshToken ( )

Revokes the refresh token if offline mode is used.

Implemented in Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.

Property Documentation

bool Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.IsOffline
getset

Indicates if your application needs to access APIs when the user is not present at the browser. This is defaulted to true.

string Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.RedirectUri
getset

Gets or sets where the url where the response is sent. This should be a registered redirect uri on the API console.

string Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.RefreshToken
getset

Gets or sets a token that may be used to obtain a new access token. Refresh tokens are valid until the user revokes access.


The documentation for this interface was generated from the following file: