cURL
curl --request GET \ --url https://api.planetscale.com/v1/organizations/{organization}/service-tokens/{id} \ --header 'Authorization: <api-key>'
{ "id": "<string>", "name": "<string>", "display_name": "<string>", "token": "<string>", "plain_text_refresh_token": "<string>", "avatar_url": "<string>", "created_at": "<string>", "updated_at": "<string>", "expires_at": "<string>", "last_used_at": "<string>", "actor_id": "<string>", "actor_display_name": "<string>", "actor_type": "<string>", "service_token_accesses": [ { "id": "<string>", "access": "<string>", "description": "<string>", "resource_name": "<string>", "resource_id": "<string>", "resource_type": "<string>", "resource": { "id": "<string>", "name": "<string>", "created_at": "<string>", "updated_at": "<string>", "deleted_at": "<string>" } } ], "oauth_accesses_by_resource": { "database": { "databases": [ { "name": "<string>", "id": "<string>", "organization": "<string>", "url": "<string>" } ], "accesses": [ { "name": "<string>", "description": "<string>" } ] }, "organization": { "organizations": [ { "name": "<string>", "id": "<string>", "url": "<string>" } ], "accesses": [ { "name": "<string>", "description": "<string>" } ] }, "branch": { "branches": [ { "name": "<string>", "id": "<string>", "database": "<string>", "organization": "<string>", "url": "<string>" } ], "accesses": [ { "name": "<string>", "description": "<string>" } ] }, "user": { "users": [ { "name": "<string>", "id": "<string>" } ], "accesses": [ { "name": "<string>", "description": "<string>" } ] } } }
Get information about a service token.
A service token must have at least one of the following access in order to use this API endpoint:
Service Token Accesses read_service_tokens
read_service_tokens
Show child attributes