API
Scopes
API scopes control what actions a token can perform in the Tny API. Scopes are assigned when creating an access token. For a general overview of how scopes work, see the scopes documentation page.
Available Scopes
Full Access
| Scope | Description |
|---|---|
tny | Full access to all Tny API endpoints and GraphQL operations |
Link Scopes
| Scope | Description |
|---|---|
tny:links:read | List and view Tny links |
tny:links:write | Create, update, and delete Tny links, including custom social cards |
Domain Scopes
| Scope | Description |
|---|---|
tny:domains:read | List and view custom domains and domain redirects |
Utility Scopes
| Scope | Description |
|---|---|
tny:utilities:read | Unshorten URLs and fetch URL metadata |
The tny scope grants access to every tny:* scope. Existing tokens with the tny scope continue to work without changes.
Each protected field in the API playground shows its required scope in the security section.
Example Token Configurations
Read-Only Link and Domain Access
For a tool that should only inspect links and domains:
Code
Link Management
For an integration that creates and manages short links:
Code
This also allows reading links, so a separate tny:links:read scope is not required.
Utility-Only Access
For a tool that only unshortens URLs or fetches metadata:
Code