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

CodeStateDescription
200OKrequest has succeeded
400Bad Requestinvalid request. often is generated when an input parameter is missing
401UnauthorizedInvalid API Key
429Too Many RequestsYou are sending to many requests per minute.
422StatusUnprocessableEntityIndicates 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