cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

An Application Programming Interface (API) enables developers to add functionality (such as sending an SMS) to their app that would be difficult to program themselves.  APIs consist of a group of methods and operations that can be accessed through endpoints, URLs that can be plugged into an application's code to send and receive information.

 

An example is the Sinch SMS API. It contains endpoints that enable applications to send and receive SMS messages.  Imagine that you want to build an appointment reminder or marketing app. An application like this needs the ability to send SMS messages at scheduled times. To do this, your app simply sends a Post request to the SMS send endpoint . This tells Sinch the message you want to send, the numbers you want to send it to, and when you want it to be sent. Our servers handle the rest, making your development easier, faster and more productive.

 

Endpoints can be a pain to use directly so many developers use APIs in the guise of an SDK.  In the case of the above example, let's say your app is written in Python. Instead of calling the SMS API send endpoint directly, it can call the send method of our Python SDK.

 

One of the most popular type of APIs is the REST API. This sends and receives data in the popular JSON format. Sinch uses REST APIs to provide integrations with SMS , WhatsApp, RCS and voice calling.

 

APIs, particularly REST APIs are an effective development tool that allows developers at all levels to integrate advanced functionality into their applications. Check out some popular Sinch APIs.

SMS

WhatsApp

RCS

Email

Numbers

Verification

Voice.

 

To enable developers to use them effectively, APIs are normally extensively documented. The state of the art in documentation standards is the Open API Specification (OAS). Sinch uses OAS 3.0 to provide consistent and comprehensive API documentation.  OAS files can also be imported into Postman to create Postman Collections. Postman is a convenient tool for testing APIs and is often used for QA purposes.

 

Authenticating APIs

 

APIs almost always require some form of authentication.  This can come in a number of types:

 

  • Basic Authentication is an HTTP authentication scheme that requires a username and password. These are normally sent in the request header. Basic Auth is mainly used for testing purposes.
  • OAuth 2.0 requires a short lived access token. The short lifetime of the token makes it more secure than Basic Auth
  • JWT authentication combines the simplicity of Basic Auth with the security of OAuth 2.0. Like Basic Auth, it requires a username and password, but then it adds an extra stage. The API provider generates an encrypted token with the user's credentials, that is sent back to the consumer in response. API users can then use this token in subsequent API requests to authenticate themselves.
  • API Key Authentication requires an API key called a bearer token, which is typically sent in the request header. It's used in the SMS API.

 

The first two types of authentication are used in the Sinch Conversation API, which allows you to leverage a single API to send and receive messages over the most popular channels in the world.

Version history
Last update:
‎11-03-2023 04:17 AM
Updated by: