Auth
These are the docs for various authentication endpoints. Used for getting the currently logged in user, as well as fetching and creating access tokens.
Get self
Returns the currently logged in user.
GET /api/v3/auth/self
Generate a new access token
Generates a new access token with the specified scopes. The access tokens will get created for the user you're logged in as.
POST /api/v3/auth/self/access_tokens
The list of available scopes: paste
, paste:read
, user
, user:read
, user:access_tokens
Once you get the access token, you will never be able to see the actual secret token again.
Required scope
user:access_tokens
Request
{
"scopes": ["paste:read", "user:read"],
"description": "text to remind you what the access token is for",
"expiresIn": "never"
}
Response
{
"accessToken": "...",
"expiresAt": null
}
Get all access tokens
Returns the list of all of your access tokens. This response doesn't actually return the access token strings, since they're encrypted.
GET /api/v3/auth/self/access_tokens
Delete an access token
Deletes a single access token by its ID.
DELETE /api/v3/auth/self/access_tokens/:id
Required scope
user:access_tokens