...
expires_in
specifies the number of seconds remaining for theaccess_token
to expire.You should use the
access_token
as the Bearer token header for accessing any resource.Header Name -
Authorization
Header Value -
Bearer 2c7c0f10-adf5-ed55-a931-caeea29464ee
You should use the
refresh_token
in order to get a newaccess_token
once it is expired
3. Refresh Token
<ToDo>You would need to call this API for getting a new access_token
if it expired. Your application should ideally store the refresh_token
generated previously (ex. database). Use the refresh_token
to retrieve a new access_token
.
Of course, you should pass client_id
and client_secret
similar to the previous request.
Status | ||||
---|---|---|---|---|
|
POST /api/v1/oauth/token
Query Parameters
Name | Type | Description |
---|---|---|
|
| Required. The client ID you received from Citesphere for your App. |
|
| Required. The client secret you received from Citesphere for your App. |
|
| Required. Use the Example: |
|
| Required. Use |
Example: POST /api/v1/oauth/token?client_id=OAUTHCLIENT007&client_secret=xyz&refresh_token=0d06219a-1b49-7895-9220-ef3b9810f09d&grant_type=refresh_token
Response
Code Block | ||
---|---|---|
| ||
{
"access_token": "c322172e-16ac-8952-95e7-19639745bbaf",
"token_type": "bearer",
"refresh_token": "0d06219a-1b49-7895-9220-ef3b9810f09d",
"expires_in": 3600,
"scope": "read"
} |
You can use the newly generated access_token
for accessing resources.