REST Authentication
The Verification API uses the standard HTTP Authorization
header to pass authentication information to the Sinch servers. You can use basic authentication or signed requests. Additionally, you can set up signed requests for callbacks the Sinch servers make to your server, to validate and verify they are trusted.
Basic Authentication
Basic authentication is the fastest and simplest method of authenticating API requests. All you need is the application key and secret from the dashboard.
To use basic authentication, set the application key as the username and the secret as the password, like in the following example:
//application call
usernameAndPassword = ApplicationKey + ":" + ApplicationSecret
The username and password must be base64 encoded before being added to the header, like in the following example:
Authorization = "Basic " + Base64 ( usernameAndPassword )
Note:
Basic authentication is quick and easy to use and is best used for testing or prototyping. In a production environment, we recommend using signed requests.