ChannelEngine: get API access
About this article
This article describes how to create an API key within the ChannelEngine web application and use it for authentication.
Table of contents
Use an API key for authentication
Create an API key
To create an API key in your ChannelEngine account:
- Go to Settings, Merchant API keys.
- Click Add and enter a name to describe the key.
- Click Add again.
The newly created API key can be tested via the OpenAPI/Swagger reference (e.g.: https://YourAccount.channelengine.net/api/swagger/index.html) or with an API tool like Postman. You can also test it via one of the pre-built API clients, or using your own implementation.
NB: make sure that you are using the correct URL when connecting to ChannelEngine, and not demo.channelengine.net. Using the demo account results in the error
{ "StatusCode": 401, "LogId": null, "Success": false, "Message": "API key is unknown: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "ValidationErrors": {} }
.Use an API key for authentication
Although it is possible to authenticate an API using a key directly in the URL, certain webservers log URLs – making this an unsafe practice.
ChannelEngine recommends you do the authentication by inserting the API key in a request header. E.g.:
GET /something HTTP/1.1
X-CE-KEY: 0001112223334445556667778889991010101111
Comments
0 comments
Article is closed for comments.