Authentication
Authentication is a crucial step in securely accessing the https://unify.smsgateway.center API. This section provides comprehensive information on how to authenticate your API requests effectively using login credentials. To ensure the security and integrity of your communication, follow the guidelines outlined below.
Login Credentials (Required Parameters):
To authenticate your API requests, you have two options: using userid-password
or utilizing an userid-apiKey
. You should choose one of these methods for authentication.
Using userid and password:
- userid: Your Registered Username
- Description: This parameter refers to your registered username and should be included in the API request. It acts as an identifier for your account.
- password: Your Password
- Description: This parameter represents your password associated with the registered account. If your password contains special characters, make sure to urlencode it before including it in the request.
Using apiKey:
- apiKey: Your Unique apiKey
- userid: Your Registered Username
- Description: The
apiKey
is a unique and confidential identifier linked to your account. This method of authentication is recommended when you prefer not to useuserid
andpassword
in the request. Unlike userid and password,apiKey
should be sent as an HTTP header.
Important Notes:
- If you choose to use
apiKey
for authentication, it must be included as an HTTP header. Do not disclose yourapiKey
to anyone, as it provides access to your account and data. - You can obtain your
apiKey
from your user control panel. It serves as a secure alternative touserId
andpassword
and is commonly used in scenarios where these credentials are not suitable.
Authentication Procedure:
- Choose the authentication method that best suits your needs:
userid-password
or userid-apiKey
. - If you opt for
userid-password
:
- Include the
userid
andpassword
parameters in the API request. - Ensure that the
password
is urlencoded if it contains special characters.
- If you opt for
apiKey
:
- Retrieve your
apiKey
from your user control panel. - Send the
apiKey
as an HTTP header while making the API request along with userid parameter
Effective authentication is crucial to maintain the security of your API requests. By following the guidelines above, you can seamlessly integrate the https://unify.smsgateway.center API into your applications and systems, ensuring the confidentiality and integrity of your communication.
Key | Value | Description |
---|---|---|
Login Credentials (Required Parameters) | ||
Authenticate your API request using userId-password or apiKey. You should use either one to authenticate your login. | ||
userId | Your Registered Username | The registered username parameter to be passed. You can use this if apiKey is not being used. |
password | Your password | The password needs to be urlencoded if there are any special characters used in the password field. You can use this if apiKey is not being used. |
apiKey | Your unique apiKey | apiKey needs to be sent as HTTP header when you are not using userId and password credentials. You can avail this from your user control panel and use instead of userId and password HTTP Request parameter. Please do not disclose this to anyone. |
Basic Auth API Documentation
This API documentation outlines the usage of the Basic Auth API provided by https://unify.smsgateway.center. The API requires Basic Authentication for token generation and uses Bearer Token for sending messages. Please follow the guidelines below to integrate and utilize this API effectively.
Generate Token
To generate a token, you need to use Basic Authentication, with the username and password encoded in base64 format. Here’s how you can do it using the curl
command:
Example: (username:password) encoded in base64 format
We have encoded in base64 format for “testusername:testpassword” in this example, and it encodes with value “dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA==”. You have to set this in header as shown below
Endpoint: https://unify.smsgateway.center/me/
Request:
curl --location --request POST 'https://unify.smsgateway.center/me/'
--header 'Authorization: Basic <strong>dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA</strong>=='
--header 'Content-Type: application/json'
Response:
{
"status": "success",
"token": "YaFljBZQUQbTLkeOHIYpNX_hxvh-XwP1rGK52qbhxB0NyzjTWfysBHowoeY9Aju-ElVgeInxyE_wR_JfHSfuCEqec9K8dVZCaDmdqsr9fPlEMzqMQmKiUvexuQhj3CGRbDwQbH0XYkY0wwo1Vw3LvMe6XgUJglgVUSkhLZHKlMvTcceIdIMJWPIwrRzC3GQSGku3l19lZdvY-x-90ybVAf6mscNyV_B6S0mjnEKHfR1pFT4U3yl48Sva9CU9fQGUA_FI3z33Ln4=",
"expires_after": "2023-08-19 14:26:38",
"statusCode": "200",
"reason": "success"
}
Send Message using Basic Auth API
Endpoint: https://unify.smsgateway.center/SMSApi/send
Request:
curl --location 'https://unify.smsgateway.center/SMSApi/send'
--header 'Authorization: Bearer YaFljBZQUQbTLkeOHIYpNX_hxvh-XwP1rGK52qbhxB0NyzjTWfysBHowoeY9Aju-ElVgeInxyE_wR_JfHSfuCEqec9K8dVZCaDmdqsr9fPlEMzqMQmKiUvexuQhj3CGRbDwQbH0XYkY0wwo1Vw3LvMe6XgUJglgVUSkhLZHKlMvTcceIdIMJWPIwrRzC3GQSGku3l19lZdvY-x-90ybVAf6mscNyV_B6S0mjnEKHfR1pFT4U3yl48Sva9CU9fQGUA_FI3z33Ln4='
--header 'Cookie: PHPSESSID=vqesuvvstg507qs22p3f60s0mo; SERVERID=webC1; SERVERNAME=s1'
--form 'userid="yourusername"'
--form 'mobile="919999999999"'
--form 'senderid="SENDRID"'
--form 'dltEntityId="11xxxxxx"'
--form 'msg="Hello world, this is a test sms"'
--form 'sendMethod="quick"'
--form 'msgType="text"'
--form 'output="json"'
--form 'duplicatecheck="true"'
Response:
{
"status": "success",
"mobile": "919999999999",
"invalidMobile": "",
"transactionId": "440373123777053194",
"statusCode": "200",
"reason": "success",
"msgId": ""
}
Please note that the provided token expires after the indicated expires_after
date. Make sure to handle token expiration and generate a new token when needed.
For further assistance or inquiries, please contact us.

Unlock Real-Time Messaging – Integrate Today!
Try Our API in a Sandbox Environment Before Going Live!
Join Thousands of Developers – Try Our API Now!
Get in touchSign upTestimonials
Why do Great Businesses Trust SMS Gateway Center?