Oman API Endpoint
This endpoint will send pin to msisdn & verify them, for a service hosted by Comparo Media.
It's your responsibility to secure the token shared by the API team, using it publically allows anyone to access and make requests on behalf of you for the service.
For token related queries, contact your Comparo Media partner or send an email to [email protected].
Flow 1 :- This flow is used for both Operator, Omantel & Ooredoo.
If you don't want to have user redirection, Please use Flow 2 Which will only work for Ooredoo Operator.
Generate Request URL
POST /generate_pin_url
Get the URL to send Pin with redirect url.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
msisdn
string
Mobile number / MSIDN of the user. Prefix mobile number with: 00{country_code_without_+_symbol}
redirect_url
url
The url on which the user will land after calling the URL.
affiliate_params
object
Object with clickid and trackid details,
affiliate_params.click_id
string
123456
Click ID
affiliate_params.tr_id
string
123456
Track ID
Response (When you receive the URL in the response you need to redirect user to that URL to get the code & message for the generate_pin API, This is the required flow from Omantel operator to redirect user & get the code & message.)
{
"status": true,
"data": {
"url": "https://example.com",
"req_id": "01j98k0p8pqz3aww26xfp3mbpz"
}
"message": "Request generated Successfully"
}{
"status": false,
"message": "Please enter MSISDN"
}{
"status": false,
"message": "HTTP/1.0 401 Unauthorized. Token not found in request."
}Generate PIN
POST /generate_pin
Send Pin to MSISDN, Code & message you recieved when you get redirected to the redirect url from the first API.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
msisdn
string
Mobile number / MSIDN of the user. Prefix mobile number with: 00{country_code_without_+_symbol}
code
number
-1
Code received from in your URL.
message
string
INVALID
Message received in your URL.
req_id
string
01j98k0p8pqz3aww2
Request Id received from first API.
Response
{
"status": true,
"message": "Pin sent successfully"
}{
"status": false,
"message": "Please enter MSISDN"
}{
"status": false,
"message": "HTTP/1.0 401 Unauthorized. Token not found in request."
}Verify PIN
POST /verify_pin
Verify the pin sent to the MSISDN
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
msisdn
string
Mobile number / MSIDN of the user. Prefix mobile number with: 00{country_code_without_+_symbol}
pin
number
Pin which your user enters.
req_id
string
01j98k0p8pqz3aww2
Request Id received from first API.
Response
{
"status": true,
"message": "Pin verified successfully"
}{
"status": false,
"message": "Pin Expired"
}{
"status": false,
"message": "HTTP/1.0 401 Unauthorized. Token not found in request."
}Flow 2 :- This flow is used only for Ooredoo Operator.
Generate PIN
POST /generate_pin
Send Pin to MSISDN.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
msisdn
string
Mobile number / MSIDN of the user. Prefix mobile number with: 00{country_code_without_+_symbol}
affiliate_params
object
Object with clickid and trackid details,
affiliate_params.click_id
string
123456
Click ID
affiliate_params.tr_id
string
123456
Track ID
{
"status": true,
"data": {
"req_id": "01j98k0p8pqz3aww26xfp3mbpz"
}
"message": "Pin sent successfully"
}{
"status": false,
"message": "Please enter MSISDN"
}{
"status": false,
"message": "HTTP/1.0 401 Unauthorized. Token not found in request."
}Verify PIN
POST /verify_pin
Verify the pin sent to the MSISDN
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
msisdn
string
Mobile number / MSIDN of the user. Prefix mobile number with: 00{country_code_without_+_symbol}
pin
number
Pin which your user enters.
req_id
string
01j98k0p8pqz3aww2
Request Id received from first API.
Response
{
"status": true,
"message": "Pin verified successfully"
}{
"status": false,
"message": "Pin Expired"
}{
"status": false,
"message": "HTTP/1.0 401 Unauthorized. Token not found in request."
}Last updated