Requesting & Using API Keys
Summary
Authentication and authorization for the Skip Go API are managed via API keys.
This document covers:
- Why you should use an API key
- How to get your key set up
- How to use the key in your requests
API Keys have replaced client_id
Historically, we used the client_id
passed as a request parameter to identify and authenticate integrators. This system has been fully deprecated. If you’re currently using client_id
, you should transition to using an API key.
(We’re making this transition because client_id
didn’t abide by best practices for security, and we could only attach limited functionality to it, since it was passed in the request body instead of a header.)
Benefits of using an API key
Technically, you can access most of the basic functionality of the Skip Go API without an API key. But there are numerous benefits to authenticating yourself with a key:
- No rate limit: Integrators that do not pass a valid API key in their requests will be subject to a restrictive global rate limit, shared with all other unauthenticated users.
- Improved fee revenue share pricing: Unauthenticated integrators will be subject to a 25% revenue share on their fee revenue by default. Authenticated integrators who use API keys will be subject to a cheaper 20% revenue share by default.
- Access to privileged features: Integrators who authenticate with an API key will receive access to premium features that we cannot offer to the general public (e.g. Gas estimation APIs, universal balance query APIs, etc…)
- Metrics on your volume and revenue: Authenticated integrators will receive access to monthly statistics regarding their total swap and transfer volume and the amount of fee revenue they’ve earned. They will also receive annual transaction data for taxes.
How to get an API Key
1. Request an API Key
Open a support ticket on our Discord and tell our customer support that you’d like an API key.
Please provide the following information in your request to help us get to know your project:
- Your name (or pseudo-anon name) and contact info (ideally Telegram, but possibly Email, Signal, etc…)
- Your project name
- A brief, 1-2 sentence description of your project
The customer support team member at Skip will establish an official channel of communication between Skip and your project (e.g. an email thread or a telegram group etc…).
2. Store the API Key Securely
You should store the API key immediately when you create it. We do not store your raw API key in our server for security reasons, so we will not be able to access it for you if you lose it.
It is important to keep your API key private. Anyone with your API key can make requests to the Skip Go API as you, getting access to your rate limit, privileged features, and affecting your revenue and volume statistics.
How to use an API key
Via REST API
You should pass your API key in every call to the Skip Go API using the authorization
HTTP header.
For example:
Via @skip-go/client
For users of the @skip-go/client
TypeScript package, the apiKey
can be included in the SkipClientOptions
object when constructing a SkipClient
. After you include it in construction, the SkipClient
will handle passing it in the authorization
header of all requests.
For example:
Setup a Proxy to Receive Skip Go API Requests and Add the API Key
To keep your API key secure and private, we recommend that you proxy the API requests from the frontend to your own backend—where you can add your API key in the header before forwarding the request to the Skip Go API.
The snippets below show you how to use Next.js/Vercel for this kind of proxying. It only takes a moment to set up.
pages/api/skip/handler.tsnext.config.js@skip-router.env
How to Request Volume & Revenue Statistics
Just return to your official communication channel with Skip (probably a Telegram channel) and request the data. We can share monthly reports. Eventually, we will create a customer portal with dashboards, so you’ll have access to all the data you need in a self-service manner.
Have questions or feedback? Help us get better!
Join our Discord and select the “Skip Go Developer” role to share your questions and feedback.