Skip to content
Sinch Voice API: Choosing between v1 and v2

For all new projects, please use Voice API v2. This is especially important for projects involving:

  • AI capabilities like Streams and Voice Relay
  • Voice campaigns like Batch calling

You should only use the older Voice API v1 if one of the following is a strict requirement:

  • The project must be in General Availability (GA).
  • The project requires In-App voice or Conferencing (until these features are available in v2).

REST Authentication

The Voice 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.

Important!

Before using the Voice API to make calls, you must first purchase numbers using either the dashboard or the Numbers API. The Numbers API uses a different set of credentials than the Voice API, so ensure you follow the documentation for more information.

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:

Basic example for authentication
//application call
usernameAndPassword = ApplicationKey + ":" + ApplicationSecret

The username and password must be base64 encoded before being added to the header, like in the following example:

Base64 encoding 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.