public class OauthApiContainer extends ApiContainer
gson| 构造器和说明 |
|---|
OauthApiContainer() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
oauthAuthorize(Long clientId,
String redirectUri,
String state,
String scope,
String accountType,
Long accountDisplayNumber,
List<String> fields)
获取Authorization Code
|
OauthTokenResponseData |
oauthToken(Long clientId,
String clientSecret,
String grantType,
String authorizationCode,
String refreshToken,
String redirectUri)
通过Authorization Code获取Access Token或刷新Access Token
|
handleResponsepublic String oauthAuthorize(Long clientId, String redirectUri, String state, String scope, String accountType, Long accountDisplayNumber, List<String> fields) throws ApiException, TencentAdsResponseException
clientId - (required)redirectUri - (required)state - (optional)scope - (optional)accountType - (optional)accountDisplayNumber - (optional)fields - 返回参数的字段列表 (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the
response bodyTencentAdsResponseExceptionpublic OauthTokenResponseData oauthToken(Long clientId, String clientSecret, String grantType, String authorizationCode, String refreshToken, String redirectUri) throws ApiException, TencentAdsResponseException
clientId - (required)clientSecret - (required)grantType - (required)authorizationCode - (optional)refreshToken - (optional)redirectUri - 应用回调地址,当 grant_type=authorization_code时,redirect_uri 为必传参数,仅支持 http 和
https,不支持指定端口号,且传入的地址需要与获取authorization_code时,传入的回调地址保持一致 (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the
response bodyTencentAdsResponseExceptionCopyright © 2020. All rights reserved.