API Keys
Creating an API Key
Learn how to create an API key to authenticate requests to the KingsPay API.
An API key is required to authenticate all requests to the KingsPay API. You can create and manage your keys from the Dashboard.
Steps
- Go to Integrations → API Keys in the Dashboard.
- Click Create new API key.
- Give your key a descriptive name so you can identify its purpose later (e.g. "Production Server" or "Staging").
- Select the permissions you want to grant. Only enable what the key actually needs — see API Key Permissions for details.
- Click Create API key.
- Copy the key and store it somewhere safe. You will not be able to view it again after closing this dialog.
Keep your API key secure
Anyone with your API key can act on your behalf. Never share it or expose it in public repositories, client-side code, or any other publicly accessible location. If it is compromised, delete it immediately from the Dashboard and generate a new one. Read more on Securing API Keys.
Next Steps
Once you have your API key, you can:
- Pass it as a
Bearertoken in theAuthorizationheader on all API requests — see Authentication. - Restrict which permissions the key has — see API Key Permissions.
- Lock the key to specific server IPs — see IP Restrictions.
- Learn best practices for keeping it safe — see Securing API Keys.