TextLink
  • Sending an SMS
  • OTP/Phone verification
  • Send SMS through your phone
  • Receiving SMS and webhook setup for SMS notifications
Powered by GitBook
On this page
  • Getting an API key
  • Sending an HTTP POST request
  • Send an SMS wih the custom body to the recipient phone number.
  • Examples for different programming languages

Sending an SMS

Last updated 1 month ago

TextLink offers a versatile SMS API, tailor-made for developers who seek straightforwardness in sending and receiving SMS. The act of dispatching an SMS is inherently simple, and we aim to reflect this simplicity in our API. We ensure it's user-friendly, eliminating the need for elaborate account setups, mandatory logins, or additional recurring charges.

Getting an API key

To be able to use TextLink for sending an SMS or user verification, you first have to , after that you are going to get 500 free messages per month, which you can use to send SMS or verify user request anywhere in the world.

After you have registered an account, your API key will be available on the.

Sending an HTTP POST request

To send an SMS, you can send the following POST request with tool of your choice (like Postman), or use any of the programming languages that support REST API calls.

Send an SMS wih the custom body to the recipient phone number.

POST https://textlinksms.com/api/send-sms

Headers

Name
Type
Description

Content-Type*

The value should be "application/json"

Authorization*

Request Body

Name
Type
Description

phone_number*

String

Recipient phone number, with country prefix. E.g. +11234567890

text*

String

Message body

sim_card_id

Number

custom_id

String

{
  ok: true
}
{
  ok: false,
  message: "Reason string"
}
{
  ok: true,
  queued: true
}

Examples for different programming languages

// Firstly, install the helper library using  or 

const textlink = require("textlink-sms");
textlink.useKey("YOUR_API_KEY"); // Replace with your API key

textlink.sendSMS("+381611231234", "Dummy message text...");
// Firstly, install the helper library using  or 

import TextLink from "textlink-sms";
TextLink.useKey("YOUR_API_KEY"); // Replace with your API key

TextLink.sendSMS("+381611231234", "Dummy message text...");
# Firstly, install the helper library using 

import textlink as tl

tl.useKey("YOUR_API_KEY") # Replace with your API key

result = tl.sendSMS("+381637443242", "Your message text...")
print(result)

The value should be "Bearer API_KEY", where API_KEY is the API key that you have registered on the

(Optional) Id of the SIM card that you want to send the message from. Can be found in the , by clicking on the device having the SIM card you need

Custom id that you want us to send to you in our

register an account
API console
API Console
Devices Console
failed message webhook