v1

latestSwagger 2.0Apache 2.02026-07-1334102.9 MB
Tokens

Personal Access Token Detail

Retrieve details of a specific personal access token.

Returns A JSON:API-compliant response with the token's details.

Errors - 404 Not Found: Token not found or not owned by the user.

get/tokens/{_id}/

Path parameters

_idstring required

The tokens's unique identifier.

Response

Successful retrieval of tokens details.

Example response

{
  "data": {
    "id": "token123",
    "type": "tokens",
    "attributes": {
      "name": "My API Token",
      "date_created": "2024-03-14T15:00:00Z"
    },
    "relationships": {
      "scopes": {
        "links": {
          "related": "https://api.osf.io/v2/tokens/token123/scopes/"
        }
      }
    }
  }
}