Skip to main content

OauthToken

调用该接口获取API access_token。

Request

get \oauth\{tenant_id}\token
NameLocated inTypeDescription
tenant_idpathstringtenant_id path param

Request Parameters

NameLocated inTypeDescriptionRequired
grant_typequerystringgrant_type 'authorize_code','password', query paramtrue
codequerystringcode with authorize response,query paramfalse
redirect_uriquerystringredirect_uri while grant_type is code,query paramfalse
usernamequerystringusername while grant_type is password ,query paramfalse
passwordquerystringpassword while grant_type is password,query paramfalse
refresh_tokenquerystringrefresh token while grant_type is refresh_token,query paramfalse
disable_redirectquerybooleanauto redirect if auto_redirect = trueparamfalse

Response

Response 200

Code2DescriptionTypeSchema
200OKObjectv1TokenResponse

v1TokenResponse

NameTypeDescription
access_tokenstring
expires_instring
redirect_urlstring
refresh_tokenstring
token_typestring

Response default

Code2DescriptionTypeSchema
defaultAn unexpected error response.ObjectrpcStatus

rpcStatus

NameTypeDescription
codeinteger
detailsArray[protobufAny][ 具体参数可见下面 protobufAny ]
messagestring

protobufAny

NameTypeDescription
@typestring