Body Required
-
tenantId string
Maximum length is
21
. -
The name of the resource.
Minimum length is
1
. -
The unique resource indicator. Should be a valid URI.
Minimum length is
1
. -
accessTokenTtl number
The access token TTL in seconds. It affects the
exp
claim of the access token granted for this resource.Default value is
3600
.
POST
/api/resources
curl \
-X POST https://[tenant_id].logto.app/api/resources \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tenantId":"string","name":"string","indicator":"string","accessTokenTtl":3600}'
Request examples
{
"tenantId": "string",
"name": "string",
"indicator": "string",
"accessTokenTtl": 3600
}
Response examples (201)
{
"tenantId": "string",
"id": "string",
"name": "string",
"indicator": "string",
"isDefault": true,
"accessTokenTtl": 42.0,
"scopes": [
{
"tenantId": "string",
"id": "string",
"resourceId": "string",
"name": "string",
"description": "string",
"createdAt": 42.0
}
]
}