Authorization¶
All API requests require authentication. You need to set the HTTP authorization header which should contain the authentication type and credentials.
Authorization: <type> <credentials>
Devino.Online API provides two types of authorization:
- API Key - through generated API key.
- Basic - Base64 encoded combination of username and password from Devino.Online personal account.
API Key¶
API Key is the most flexible and secure type of authorization. API keys can have limited scope and can be applied to only some API methods. Besides they can be revoked at any time. Due to these reasons, API keys are well suited for separating the API access rights across multiple applications.
In order to get the API Key you need to:
- Enter or create your Devino.Online personal account.
- Go to the API Key creation page and create a new key.
Enter the authorization type (Key
) and the API key you received in a header:
Authorization: Key YWxhZGRpbjpvcGVuc2VzYW1l
Basic¶
Basic authorization type can be used when authorization through API Key is not available. Also this authorization type can be used for testing an integration.
In this case authorization header is Base64 encoded combination of login
and password
from Devino.Online personal account.
Creating an authentication header:
- Strings
login
andpassword
are combined with colon (:
) as a separator (login:password
). - The resulting string is encoded using Base64.
- The encoded string should be added in a header after entering the authorization type (
Basic
).
Authorization: Basic bG9naW46cGFzc3dvcmQ