The d7 user dashboard includes a developer section where you can create applications. Each application has its own authentication token.
For creating your first application, click here.
Make sure you copy the authentication token generated during app creation
Also the token can be regenerated at any time by clicking here.
The token will look like this:
eyJhbGadfadfciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWsdsgQiOiJhdXRoLWJhY2adatlbmQ6YXBadsfwIiwic3ad
Check here to see how many test credits and main balance you have left on your D7Networks account
{
"balance": 99.9999999
}
- | Parameters | Value / Pattern | Example(s) |
---|---|---|---|
originator* | The Sender/Header of a message. We can use your brand name with a maximum character limit of 11 or your mobile number with your country code. If you would like to register a new Sender ID, you can submit your details here | SMSInfo | |
recipients* | Mobile Numbers to send SMS seperated by comma in an array. The recipient’s phone number should have a country code prefix. You can also set the Default Country here, and all your messages will be prefixed with the selected country code. | +971509752555 | |
content* | The message content is being sent. A long message over 160 characters will be split into multiple messages with 153 characters each and forwarded to telecom. When Unicode messages exceed 70 characters, they are split into multiple messages of 63 characters each. Also, billing will be based on the number of message parts sent | Greetings from D7 API | |
data_coding | Set as text for normal GSM 03.38 characters(English, normal characters). Set as unicode for non GSM 03.38 characters (Arabic, Chinese, Hebrew, Greek like regional languages and Unicode characters). Set as auto so we will find the data_coding based on your content. | text |
* indicates Mandatory Parameter
{
"messages": [
{
"channel": "sms",
"originator": "D7-RapidAPI",
"recipients": [
"+9715097526xx",
"+9715097526xx"
],
"content": "Greetings from D7 API ",
"data_coding": "text"
}
]
}
{
"request_id": "e06b8ccb-eb07-4786-b188-25ebabcdc17",
"status": "accepted",
"created_at": "2023-02-01T08:46:26.390251"
}
When calling D7Verify API from an application, the below parameters must be passed (at least mandatory ones) and the api will return the request id id on success.
- | Parameter | Value / Pattern | Example(s) |
---|---|---|---|
*originator | The Sender/Header of a message. We can use your brand name with a maximum character limit of 11 or your mobile number with your country code. If you would like to register a new Sender ID, you can submit your details here | SMSInfo | |
*recipients | Mobile Numbers to send OTP code. | +971509752555 | |
*content | OTP Message Content with {} placeholder | Greetings from D7 API, your mobile verification code is: {} | |
*expiry | OTP Expiry time in seconds | 600 | |
*data_coding | Set as text for normal GSM 03.38 characters(English, normal characters). Set as unicode for non GSM 03.38 characters (Arabic, Chinese, Hebrew, Greek like regional languages and Unicode characters). Set as auto so we will find the data_coding based on your content. | text |
* indicates Mandatory Parameter
{
"originator": "SignOTP",
"recipient": "+971509752555",
"content": "Greetings from D7 API, your mobile verification code is: {}",
"expiry": "600",
"data_coding": "text"
}
When the request is validated, otp_id, status and expiry will be returned. Users can use this otp_id to regenerate otp and verify otp
{
"otp_id": "dfd31c0e-2cd2-494e-88d2-6cac05263a7f",
"status": "OPEN",
"expiry": 600
}
OTP can be regenerated using the otp_id which was returned from Generate OTP.
{
"otp_id":"8d963dbf-d655-4fe6-9157-48885a036050"
}
When the request is validated, otp_id, status and expiry will be returned. Users can use this otp_id to regenerate otp and verify otp
{
"otp_id": "84864e9c-81f5-41af-9483-c90dffd97e4a",
"status": "OPEN",
"expiry": 600,
"resend_count": 1
}
Once the user recieve the OTP, it can be verified at this endpoint
{
"otp_id":"8d963dbf-d655-4fe6-9157-48885a036050",
"otp_code":435986
}
When the request is validated the status will be returned.
{
"status": "APPROVED"
}
You can always check the OTP status at this endpoint
** replace “OTPID” with one you got at the previous step
{
"status": "OPEN"
}