Endpoint – Multiple, the base url is and the uri are per method in keeping with RESTful design
API Docs

Authentication using OAuth 2.0

2sms uses OAuth2.0 for authorization for the application API.

To create a new ClientID and Secret on your account:
1. Login to your account
2. Click on “Settings” on the left
3. Click on “API Clients”
4. Click on “Add”
5. Enter a display name in the client name field and a secret
6. Click on “Save”
7. A confirmation screen displaying the Client ID and Client Secret is displayed, make note of these
8. Click on “Finish”

To generate an access token from the client ID and client secret, create an HTTP POST request to the following URL:

With the following information in the body:
grant_type=client_credentials&client_id={theclientidthatwasgeneratedforyou}&client_secret= {thesecretyoudefined}
Replace with the client ID provided and with the client secret created.

In the response to this request you will find the access token which expires after 8 hours. You can either use the refresh token or regenerate using the above request again.
When posting requests to the API use the following headers:
• Accept: application/json
• Content-Type: application/json
• Authorisation: Bearer {accesstoken}

Sending a Single Message

Method: POST

   "Contacts": {
      "QuickRecipients": {
         "+12345678901": 2
   "Content": "Standard Send Test",
   "Options": {},
   "Type": 1

Other methods can be found here:

Scroll to Top