API Keys

API Keys

When connecting an API to a project or application, you must have an API key to authenticate your request. Creating an app within Rakuten RapidAPI generates an API key (X-RapidAPI-Key) specific to that application. You can view analytics based on the API calls you make using this app key.

Pro tip:

If you generate a code snippet within the browser, your app key will automatically appear in the generated code.

Here is an example of using an API key with the Unirest Node.js library.

.header("X-Mashape-Key", APP-KEY)

Different API Keys per Application

Do you have multiple projects you’re working on at once? Well, you can create a new app for each project, which will generate a new API key as well! This means that each app will be more secure as it uses a different API key and you’ll also be able to see separate analytics per app.

App Specific API Keys Vs. Account-wide Subscriptions

If you opt to have multiple projects under a single Rakuten RapidAPI account, keep in mind that pricing is based on account wide usage. This means that if you’re using the same API on two different projects, your billing/overage fees will be calculated using the usage of both apps.

Generating a New App and Finding API Keys

To generate a new app, which also generates new API keys, or locate the API keys for one of your apps, head over to your Rakuten RapidAPI developer dashboard.

alt text

From here you can either ‘Add New App’ or select the ‘Security’ tab of an application to find your API keys.

External API Keys & Access Tokens

Some APIs may require an API key or access token directly from their website to authenticate an account with the provider when making a request. Below is an example of Slack’s createChannel endpoint which requires an authentication token that is related to your Slack workspace.

alt text

Every API is different, but in most cases, you must visit the API provider’s website to retrieve this token or key. There are instructions within the API’s ‘API Details’ page detailing how to get this token or key.

alt text