Skip to content

Latest commit

 

History

History
87 lines (79 loc) · 1.61 KB

access_token.md

File metadata and controls

87 lines (79 loc) · 1.61 KB

Access Token

POST /oauth/token

Description

exchange access token by authorization code

Request

Query Parameters

Name Required Description
grant_type yes it must be authorization_code
code yes code from authorization code response
client_id yes your client id
client_secret yes your client secret

Example

POST /oauth/token?grant_type=authorization_code&code=SplxlOBeZQQYbYS6WxSbIA&client_id=ABC123&client_secret=QQYbY

Response

Formats

  • json

Structure

Field Name Type Value Description
access_token string used to access user resource
token_type string it must be Bearer
expires_in number expire seconds for access token
refresh_token string used to get new access token

Example

    {
        "access_token" : "2YotnFZFEjr1zCsicMWpAA",
        "refresh_token" : "tGzv3JOkF0XG5Qx2TlKWIA",
        "token_type" : "Bearer",
        "expires_in" : 28800
    }