.env
dub_) are rejected by the Partner API, and partner API keys can’t be used with the Dub API.
Create an API key
1
Go to API Keys
In the partner dashboard, go to Settings > API Keys.Only partner profile owners can create API keys.
2
Create the key
Give the key a name, select its scopes, and choose when it expires.Keys can be set to never expire, or to expire after 7, 30, 60, or 90 days, or 1 year.
3
Copy the key
Copy your key and store it in a safe place. You won’t be able to see it again.
4
Use the key
Send your key as a Bearer token in the
Authorization header of your requests:Scopes
Each key is limited to the scopes you select when you create or edit it. You must select at least one.
A request with a key that’s missing a required scope returns a
403 error that names the scopes it needs.
Manage your API keys
Owners can edit a key’s name, scopes, and expiration, or delete it, from the API Keys page. Other members of the partner profile can view the list of keys. A key stops working as soon as it’s deleted or expires. Requests with an expired key return a401 error.
If your partner account isn’t approved in the Dub Partner Network, you can still view and delete your existing keys, but you can’t create or edit keys, and requests with them return a 403 error.
Keys are also deleted automatically when the person who created them is removed from the partner profile, is no longer an owner, or deletes their Dub account.