×
Chat Widget
Chat with us!

Text.lk SMS Gateway Sri Lanka | Cheapest price on the market (0.64LKR per SMS)

  +94 77 644 00 80

Login         Register

Why Are There Two Documentations in Text.lk (HTTP & OAuth 2.0)?

Authentication Methods (There are two types)

Text.lk provides two methods to integrate with the API. Because text.lk supports two authentication methods to support different system types and technical requirements.

  1. OAuth 2.0 (Bearer Token) – Recommended
  2. HTTP (API Token in URL)

Both methods perform the same function, but they differ in security level, structure, and implementation style.

1. OAuth 2.0 (Bearer Token – POST Method) – Recommended

This is the modern and secure method for production environments.

  • Uses Authorization: Bearer YOUR_API_TOKEN
  • Uses the POST method
  • Sends data in JSON format
  • The API token is not exposed in the URL
  • More secure for large-scale systems
  • Follows modern REST API standards
  • Recommended for enterprise applications

This method exists to support:

  • Modern web applications
  • Mobile apps (Only use in the backend)
  • Backend services
  • Production environments requiring higher security

2. HTTP (GET Method)

This is a simple method mainly for legacy systems or quick integrations.

  • Uses the GET method
  • API token is passed as the api_token parameter in the URL
  • All parameters are included in the URL
  • Easy & Quick for basic integrations
  • Recommended for systems that cannot send headers
  • Recommended for testing purposes
  • Can be tested directly via browser

This method exists to support:

  • Older applications
  • Systems that cannot send custom headers
  • Quick testing scenarios

Learn more about: Is using a Api token in url or post/curl safe?

👉 Learn: Which One Should You Use?


Leave a Reply

Your email address will not be published. Required fields are marked *