Method: GET /keyLogin/
This service authenticates a REST API user based on an API key and returns an access token that is used in subsequent REST service requests.
Using the service
After signing the agreement, the contractual client creates an API key under their user account. When creating a new partner, or for an existing partner, a new API key must be created. To use the REST services, the API key authentication service /keyLogin/ must be called first. The service returns the access_token value and the token type. The received token is added to subsequent REST service requests for authentication.
Further guidance on how to create api key: Adding API keys to REST services | Abiinfo
Header parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Required | API key used for authentication. |
Response schema
KeyLoginResponse
| Field | Type | Description |
|---|---|---|
| access_token | string | Required. Access token used in subsequent REST service requests. |
| token_type | string | Required. Token type. It is usually used together with the access token in the authentication header. |
Responses
200 OK
Successful authentication — the service returns an access token and token type.
{
"access_token": "eyJhbGciOi...",
"token_type": "bearer"
}
404 Not Found
The API key was not found or authentication failed. The response uses the CustomValidationError schema.
{
"message": "API key was not found",
"code": 4041,
"id": "API_KEY_NOT_FOUND"
}
422 Validation Error
Invalid request — the required header parameter is missing or does not meet the validation rules. The response uses the HTTPValidationError schema.
{
"detail": [
{
"loc": ["header", "apiKey"],
"msg": "Field required",
"type": "missing"
}
]
}
JSON Schema
{
"KeyLoginResponse": {
"type": "object",
"required": [
"access_token",
"token_type"
],
"properties": {
"access_token": {
"type": "string",
"description": "Access token"
},
"token_type": {
"type": "string",
"description": "Token type"
}
}
}
}