This document describes the full functionalities and detailed documentation of the SMSPoh Verify API V3. It is intended for organizations and individuals who need to send or receive SMS messages programmatically.
The last version of SMSPoh Verify API V3.0 enhanced performance, streamlined endpoints, and improved security features. With simplified authentication and more consistent responses, it aims to provide a smoother, more reliable experience for developers.
The base URL for this service is https://v3.smspoh.com/api/otp.
This base URL cannot be used independently;
you must append a specific path that
identifies
the
desired operation, and you may need
to specify certain path parameters.
Please note that the previous SMSPoh API credentials are no longer compatible with API V3.
To create a new API credential, please navigate to the https://v3.smspoh.com/ and Accounts & Security > API Credentials page in the customer dashboard.
QueryParamAuth is an action filter that supports the authentication based on the access token passed through a query parameter.
This API allows you to request OTP code.
Name | Type | Description |
---|---|---|
accessToken | String Required | Your API credential. |
to | String Required | Recipient mobile numbers. The mobile number can start with (09, 959 or +959) prefixes. |
brand | String Required | The brand name included in the message content |
from | String Required | The sender ID (alphanumeric or numeric, depending on your account settings). |
ttl | Integer | Time to live or OTP validity period. You can specify time to live value in seconds. Min. 60, Max. 3,600 |
pinLength | Integer | OTP code length. Min. 4, Max. 8 |
template | String | Customize your OTP message. For Example: [{brand}] Dear customer, Your OTP code
is {code}
|
maxInvalidAttempts | Integer | Max invalid attempts for OTP code. If the user exceeds the maximum attempts, the code transaction will automatically become invalid. Min. 1, Max. 10 |
When SMSPoh responds with an HTTP or status code, it indicates that your OTP request was successful and forwarded to the mobile phone, and you may proceed with the verification process. You must extract the requestId from the response body. The requestId is used to verify the request along with the OTP code that your customer has received.
This API allows you to verify the OTP code that was requested previously. SMSPoh will validate the OTP code provided by the user against the one sent for the corresponding requestID.
Name | Type | Description |
---|---|---|
accessToken | String Required | Your API credential. |
requestId | Integer Required | OTP Request ID which response while you request the OTP. |
code | String Required | The OTP code received by your customer |
If SMSPoh responds with a successful HTTP status code such as or , it indicates that the requestId and OTP are valid, and you should grant access, confirming that the process has been successfully completed.
If SMSPoh responds with error codes such as 3**, 4**, or 5**, it indicates that the requestId and OTP are invalid, and access should not be granted.