Authentication
Glassfy API uses Authorization header with an API KEY to authenticate requests.
You can find your REST API KEY in your application setting page
Authorization: Bearer YOUR_API_KEY
HTTP Response header
Router generates a unique request ID for every incoming HTTP request that it receives. This unique ID is then passed to your application as an HTTP header called X-Request-ID.
HTTP Response codes
Code | State | Description |
---|---|---|
200 | OK | request has succeeded |
400 | Bad Request | invalid request. often is generated when an input parameter is missing |
401 | Unauthorized | Invalid API Key |
429 | Too Many Requests | You are sending to many requests per minute. |
422 | StatusUnprocessableEntity | Indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions. |
Error response sample for 401 Unauthorized
{
"status": 401,
"error": {
"code":1202,
"description": "Invalid APIKEY"
}
}
Glassfy Error Codes
SubscriberIDNotFound = 1001
GenericError = 1005
InvalidParameter = 1010
TooManyRequests = 1200
InvalidApiKey = 1202
LicenceAlreadyConnected = 1050
LicenceNotFound = 1051