GET https://www.cobot.me/api/access_tokens/:token

Returns the given access token's scope.

Authentication required:
yes
Required scope
<none>

Example

GET https://www.cobot.me/api/access_tokens/aa54807690762340764

Response:

{
  "scope": ["read_user", "write_invocies"]
}
DELETE https://www.cobot.me/api/access_tokens/:token

Revokes the given access token.

Authentication required:
yes
Required scope
<none>

Example

DELETE https://www.cobot.me/api/access_tokens/aa54807690762340764

Responds with a 204 status and an empty body.

POST https://www.cobot.me/api/access_tokens/:token/space

{
  "space_id": "space-xyz"
}

By default, access tokens belong to a user. Most operations require the user to be an admin of a space. When the user stops being an admin, they (and the token) lose access. For apps that need long-term access to a space, you can create an access token belonging to a space instead of a user.

Authentication required:
yes
Required scope
<none>

The new token will have the same scope as the one used to create it. The token will still be assigned to the user who created it. As soon as that user stops being an admin of the space, the access token will be re-assigned to the user owning the space.

Example

POST https://www.cobot.me/api/access_tokens/b66b599f5fa4d0661cecbe749e125817282c85deb19a89b47630a6364cbfa93f/space

Body:

{
  "space_id": "space-abc"
}

Response:

{
  "scope": ["read_activities", "read_user"],
  "token": "f76efc911a62ad848373b946398c63dcf992768a2da95876cadd045970a00b1f",
  "client_id": "9514a932234f137f78cd9f70a1c16110"
}

back to index