Get Consumer Token Settings
Endpoint
GET /apiops/projects/{projectName}/consumers/{consumerKey}/token-settings
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| consumerKey | string | Yes | Consumer key, assigned by the installation. Returned as consumerKey by every consumer response |
Response
200 OK with the token settings:
{
"grantType": "PASSWORD",
"tokenNeverExpires": false,
"tokenExpiresInAmount": 3600,
"tokenExpiresInUnit": "SECONDS",
"refreshTokenAllowed": true,
"refreshTokenCount": 1,
"refreshTokenExpiresInAmount": 7200,
"refreshTokenExpiresInUnit": "SECONDS",
"allowUrlParameters": false,
"jwtSignatureAlgorithm": "RS256",
"deletePrevious": false
}
The fields are the same as in Set Consumer Token Settings. A setting that was never set is absent. An unknown consumerKey answers 404 resourceNotFound.
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/consumers/CONSUMER_KEY/token-settings" \
-H "Authorization: Bearer YOUR_TOKEN"
Permissions
- User must have
IDENTITY+VIEWpermission in the project - A project outside the scope of the caller answers
404 resourceNotFound, never403 - The admin project has no consumers: a call on it answers
400 malformedRequest(params.reason=platformScopeNotSupported)