Access and scopes
The network decides which affiliate and advertiser accounts can use the API, and which parts of it. This page explains how that works and what each scope opens.
Who needs approval
| You are | To use the API |
|---|---|
| A Network or Admin user | Create a key. Nothing to ask for. |
| An affiliate or advertiser user | Ask the network once. After it approves, create as many keys as you need. |
Approval is per user and separate for the API and for webhooks.
Asking for access
- Sign in and open My profile → API keys. You see a short form instead of your keys.
- Say what you will use the API for, and send. It helps the network choose what to give you.
- The network reviews the request and ticks what your account may use.
- You get a notification with the decision. If approved, the same page now lets you create keys and lists what was allowed.
Until then every call with one of your keys answers:
HTTP/1.1 403 Forbidden
{
"errors": [
{
"code": "access_not_approved",
"message": "API access for this account has not been approved by the Network. Ask for it at /my-profile/api-keys."
}
]
}
If the request is not approved you can ask again from the same page.
What the network can grant an affiliate
What the network can grant an advertiser
Scopes of a key
When you create a key you choose its scopes from what your account was granted. Leave it at * and the key gets everything granted, including anything the network adds later. Pick specific scopes and the key stays that narrow.
What a key can really do is always the smaller of the two: what the key was created with, and what the network allows your account right now. Ask the API:
curl "https://YOUR-NETWORK-DOMAIN/api/v1/me" \
-H "Authorization: Bearer $LINKNETIK_KEY"
data.token.scopes is the answer. A call outside it answers 403 insufficient_scope and names the missing scope.
How many keys
The network sets how many API keys an affiliate or advertiser user may have. The same goes for webhook endpoints. Your API keys page shows how many you are using and how many you may have.
- Every key counts, switched on or off. Revoke one to make room for another.
- If the network lowers the number below what you already have, nothing is deleted. You keep your keys and cannot add more until you are under it.
- More keys do not mean more calls: all the keys of a user share one rate limit.
Network keys
Network and Admin keys need no approval. Their scopes only narrow what the key does inside the Network role:
Endpoints not listed need no scope. A key created with * has all of them.
When access changes
The network can change what your account may use, or revoke it, at any time. It applies on the next call: nothing is stored on the key, so you never need to recreate keys after a change. You get a notification when it happens.
Whatever is granted, a key only ever returns your own data. Scopes open groups of endpoints; they never widen whose data you see.