Authentication
Authentication
Section titled “Authentication”All Gatepay API and SDK requests require authentication using an API token.
Get Your API Token
Section titled “Get Your API Token”- Log in to your Gatepay dashboard.
- Go to the Profile section.
- Copy and store your token securely.
Using the API Token
Section titled “Using the API Token”- Pass your token as a Bearer token in the
Authorization
header for all API requests. - When using the SDK, provide your token during initialization:
const api = new Gatepay({ apiToken: "your-api-token" })
Security Best Practices
Section titled “Security Best Practices”- Never share your API token publicly or commit it to version control.
- Use environment variables to store your token in production.
- Rotate your token regularly from the dashboard if needed.
- If you suspect your token is compromised, rotate it immediately.
Example: API Request with Token
Section titled “Example: API Request with Token”GET /linksAuthorization: Bearer <your-api-token>
Next steps: