Create Kaleyra.io API Key
About API Key
An API key is a unique encrypted string associated with your company account in kaleyra.io that is used to identify the application that makes an API call. This key acts as a password to your APIs. You must include this API Key for authentication while executing an API command.
The authentication works like this—during runtime, the Kaleyra.io application will verify the API key and your company ID (the SID) and allow the request if the couple <API Key, SID> is valid. Otherwise, you will get an error as a response to the request.
Before you can do any API requests, you have to generate an API key. You may also have more than one API Key, if you are using different channels/tools from Kaleyra.io and want to have a different API Key for each of them.
Note:
Beware that if the team member who has created an API Key is deleted from your kaleyra.io account, then all the API Keys created by such team member will be invalidated and any API calls done using such API Keys will fail.
If you have a doubt about which API Key could be affected by a team member deletion, please stop team member deletion and contact your Kaleyra support team.
Please also note that you will not receive any warning or information from the system while performing the deletion.
Generate an API Key
-
Sign in to your Kaleyra.io account.
-
Go to Developers > API Keys and click Generate API Key.
The Create an API Key section appears.
-
In the Name field, enter the name you want for the API key.
-
You can either enter the IP addresses to be whitelisted on kaleyra side manually in the Whitelisted IP Addresses field, or you can click the Select IP Config dropdown, and select one of the preconfigured IP Configuration. Refer to the IP Configuration section for more details.
Note:
- If any IP address/range is whitelisted, only those addresses can make requests to the Kaleyra APIs. Requests coming from other IP addresses won’t be processed.
- If no API address is added, then API calls are accepted from any IP address for this API key.
- Kaleyra supports IP ranges (for example, 192.168.1.0/24) for both IPv4 and IPv6. To add multiple IP addresses and/or ranges, separate them with a comma. If you enter an API range, all the IP addresses in that range will be whitelisted.
- The maximum number of IP addresses/ranges that can be whitelisted is 150 for each API key.
- Click Save.
The API key is created successfully. You can see the details along with an auto-generated Security Identifier (SID) and API Key. You must pass this SID and API Key while executing the APIs.
Note:
It is recommended to download and store the key securely. It’s a one-time download process.
IP Configuration
The IP configuration option lets you create a configuration with IP addresses that you can then associate with one or more API Keys in order to whitelist the configured IP addresses.
Creating an IP configuration
To create an IP Configuration:
- Sign in to your Kaleyra.io account.
- Go to Developers > IP Configurations and click New Configuration.
- In the IP Config Name field, enter the name for the IP configuration.
- In the IP Addresses field, add the required IP addresses. IP ranges (e.g. 192.168.1.0/24), and both IPv4 and IPv6 are supported. To add multiple IP addresses and/or ranges, separate them with a comma.
- Click Save.
All the IP configurations will be listed on the IP Configuration screen. Hover over in the Associated API Keys column to view the names of the API keys that the IP configuration is associated with.
Editing an IP configuration
You can edit the details of an existing IP configuration.
- Sign in to your Kaleyra.io account.
- Go to Developers and click IP Configurations.
- Hover over corresponding the IP configuration that you want to edit, and click Edit.
- Do the required changes and click Save.
Note:
Any update done to the IP configuration will be applicable for all the associated API Key(s).
Deleting an IP configuration
You can delete an existing IP configuration.
Note:
Any update done to the IP configuration will be applied to all the associated API Key(s).
- Sign in to your Kaleyra.io account.
- Go to Developers and click IP Configurations.
- Hover over corresponding the IP configuration that you want to edit, and click Delete.
- The delete IP Configurations pop up appears with the details of the associated API keys. Click Delete to delete the IP configuration.
Updated 11 months ago