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

nametypedescription
AcceptStringAllowed application media types.
Allowed values: “application/json”
Content-TypeStringThe application media type of the resource content.
Allowed values: “application/x-www-form-urlencoded”

Request Body

NameTypeDescription
grant_typeString“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 optionStringgrant code, set to the grant code set in the callback URL after JINS login.
Required if grant_type is “authorization_code”.
redirect_uriStringCallback URL. the OAuth redirect URL set when registering the platform “Web” app with JINS MEME DEVELOPERS.
client_idStringApplication ID, which is the app ID paid out when you register an app with the platform “Web” set in JINS MEME DEVELOPERS
client_secretStringapp_secret, the app secret issued when registering an app with the platform “Web” set in JINS MEME DEVELOPERS.
refresh_token optionStringRefresh 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

nametypedescription
access_tokenStringAccess token. The validity period is 30 days.
refresh_tokenStringA token to obtain a new access token. It does not expire.
token_typeStringBearer
expires_inNumberNumber of seconds before the access token expires.
scopeStringPermissions 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

nametypedescription
AcceptStringAllowed application media types.
Allowed values: “application/json”
Content-TypeStringThe application media type of the resource content.
Allowed values: “application/x-www-form-urlencoded”
AuthorizationStringBearer token for OAuth.
Allowed values: “Bearer {access_token}”

Request Body

NameTypeDescription
tokenStringAccess_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

{}