Tokens
List Personal Access Tokens
Retrieve a list of active personal access tokens created by the authenticated user. Personal access tokens are used to authenticate requests to the OSF API without user credentials.
Returns A JSON:API-compliant response with an array of personal access token objects under the data key.
Errors Returns an errors object on failure. See Errors and Error Codes.
get/tokens/
Response
Successful retrieval of personal access tokens.
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/"
}
}
}
}
],
"meta": {
"total": 1
},
"links": {
"self": "https://api.osf.io/v2/tokens/"
}
}