Carma API Keys and tokens
If you want to start exploring the Carma API you need to create a Carma API Key. For your API Key you can also choose to generate a token which will be used when accessing the API (instead of the API Key).
Create API Key
To create your API Key you go to Account settings > Carma API click “Create new”.
After this, simply add your information to the mandatory fields (marked with asterisk) and click “Create”.
Note! Tick the API Application key if you want use the API token to connect to Carma from another applicatiom i.e. your mobile app. The API Application key is safe to distribute in an app as it has a limited scope. The API Key is more versatile and can be used to retrieve data by a malicious user.
API Tokens
If you wish to add a token you click on Options and choose Generate API token.
Your token will be generated and you can expand the view to view the complete token.
And of course, smoothly copy the token to clipboard by clicking the copy symbol to the right of the Expand/Collapse Token-symbol:
We have now improved the API token test with a more proper curl example:
- curl –H “X-Carma-Authentication-Token: thisisthesecrettoken“ \
- –H “Accept: application/json” \
- –H “Content-Type: application/json” \
- https://ibt-proxy.carmamail.com/{server}/rest/{CUSTOMERID}/apiurl
Voila! You’re good to go with your API-Token!