⚙️API Keys
Understand the difference between User Keys and Query Keys
Last updated
Understand the difference between User Keys and Query Keys
Last updated
Your API Key can be found on: https://query.nansen.ai/users/me
1) Always use the [User] Key to initiate a query
2) Use either the [User] or [Query] Key to retrieve results
The User key contains all the permissions and is required to run a query.
The Query key can only retrieve the latest results.
This setup is more secure, as it allows the API results to be used in cases where you don't want to expose your User Key, but still want others to be able to retrieve the results.
Only User API Keys can initiate a query refresh! Both User and Query API Keys can be used to retrieve results.
The Nansen Query API offers support for authentication via API keys. There are two distinct types of API keys available:
User API Key: This key mirrors the permissions and access rights of the user it belongs to. You can locate this API key on the respective user's profile page. This key allows you to perform any action that the user would be able to do, thereby providing a broad level of access. The User's API key can be found by clicking on the "Profile" section from the left navigation and appears at the bottom. There is also a button to generate a new API key. After API key regeneration, the previous API key will become invalid. See sample screenshot below:
Query API Key: This key provides access exclusively to a specific query and the resulting data from that query. This key can be found on the individual query page. It offers a more limited scope of access, which is focused solely on the query it is associated with. The Query API key can be found by clicking on the three dot "kebab" menu at the top of a saved query and selecting "Show API Key". After clicking on the Show API Key. The API key for this specific query will appear, along with sample code for how to retrieve the data for this query via API.