List the account's personal API tokens.
GET
/v1/account/api-tokens
const url = 'https://api.share2.us/v1/account/api-tokens';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.share2.us/v1/account/api-tokens \ --header 'Authorization: Bearer <token>'Returns every token (active and revoked) without the secret. Requires an interactive login; personal API tokens cannot manage tokens (they receive 403 session_required).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The account’s API tokens.
Media typeapplication/json
object
api_tokens
Array<object>
A personal access token as shown to its owner (never the secret).
object
id
required
string format: uuid
label
required
string
scopes
required
Array<string>
token_hint
Masked display form, e.g. “s2u_pat_…9f3a”. Never the full secret.
string
last_used_at
string format: date-time
expires_at
string format: date-time
revoked_at
string format: date-time
created_at
required
string format: date-time
Example
{ "api_tokens": [ { "scopes": [ "shares:read" ] } ]}default
Section titled “default”Standard error envelope.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "quota_exceeded" }}