Get/Revoke Token
Get an access token
API to get an access token.
endpoint.
POST https://apis.jins.com/meme/v1/oauth/token
Request header
name | type | description |
---|---|---|
Accept | String | Allowed application media types. Allowed values: “application/json” |
Content-Type | String | The application media type of the resource content. Allowed values: “application/x-www-form-urlencoded” |
Request Body
Name | Type | Description |
---|---|---|
grant_type | String | “authorization_code” or “refresh_token” To obtain an access token from an authorization code, specify “authorization_code”. To refresh an expired access token, specify “refresh_token”. |
code option | String | grant code, set to the grant code set in the callback URL after JINS login. Required if grant_type is “authorization_code”. |
redirect_uri | String | Callback URL. the OAuth redirect URL set when registering the platform “Web” app with JINS MEME DEVELOPERS. |
client_id | String | Application ID, which is the app ID paid out when you register an app with the platform “Web” set in JINS MEME DEVELOPERS |
client_secret | String | app_secret, the app secret issued when registering an app with the platform “Web” set in JINS MEME DEVELOPERS. |
refresh_token option | String | Refresh Token. Specifies the refresh token returned when the access token is dispensed. Required if grant_type is “refresh_token”. |
Request Example
curl -X POST https://apis.jins.com/meme/v1/oauth/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=authorization_code' \
-d 'code=67890fgehi' \
-d 'redirect_uri=https://example.com/cb' \
-d 'client_id=123456789012345' \
-d 'client_secret=67890123456789'
Response Body
name | type | description |
---|---|---|
access_token | String | Access token. The validity period is 30 days. |
refresh_token | String | A token to obtain a new access token. It does not expire. |
token_type | String | Bearer |
expires_in | Number | Number of seconds before the access token expires. |
scope | String | Permissions granted by the user. |
Response Example
{
"access_token": "47912eb18a59c28550008c725ccba1074934e00c45645a882cfe47611669c298",
"refresh_token": "47912eb18a59c28550008c725ccba1074934e00c45645a882cfe47611669c298",
"token_type": "bearer",
"expires_in": 3600,
"scope": "official"
}
Revoke access token
Revokes an access token. The revoked access token will no longer be available.
endpoint.
POST https://apis.jins.com/meme/v1/oauth/revoke
Request header
name | type | description |
---|---|---|
Accept | String | Allowed application media types. Allowed values: “application/json” |
Content-Type | String | The application media type of the resource content. Allowed values: “application/x-www-form-urlencoded” |
Authorization | String | Bearer token for OAuth. Allowed values: “Bearer {access_token}” |
Request Body
Name | Type | Description |
---|---|---|
token | String | Access_token. |
Request Example
curl -i -X POST "https://apis.jins.com/meme/v1/oauth/revoke" \
-H "Accept:application/json" \
-H "Content-Type:application/x-www-form-urlencoded" \
-H "Authorization:Bearer xsacz2je7nyea0jya5tut02jmk3x4du55om9qskyfpajhnpcpts3gs5mng7bc8d9" \
-d "token=xsacz2je7nyea0jya5tut02jmk3x4du55om9qskyfpajhnpcpts3gs5mng7bc8d9"
Response Body
None
Example response
{}