Ads API .NET library
|
Provides OAuth authorization mechanism for Ads services when using Web and Installed application flows. More...
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... | |
Provides OAuth authorization mechanism for Ads services when using Web and Installed application flows.
bool Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.FetchAccessAndRefreshTokens | ( | string | authorizationCode | ) |
Fetches the access and optionally the refresh token if applicable.
authorizationCode | The authorization code returned by OAuth server. |
Implemented in Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.
string Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications.GetAuthorizationUrl | ( | ) |
Gets 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.
|
getset |
Indicates if your application needs to access APIs when the user is not present at the browser. This is defaulted to true.
|
getset |
Gets or sets where the url where the response is sent. This should be a registered redirect uri on the API console.
|
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.