Oman API Endpoint

This endpoint will send pin to msisdn & verify them, for a service hosted by Comparo Media.

if you have been provided with a staging key, you must use the staging Base URL for API Endpoints: https://staging.comparocms.com/api

Base URL for API Endpoints: https://comparocms.com/api

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

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Required
Type
Example
Description

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"
}

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

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Required
Type
Example
Description

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"
}

Verify PIN

POST /verify_pin

Verify the pin sent to the MSISDN

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Required
Type
Example
Description

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"
}

Flow 2 :- This flow is used only for Ooredoo Operator.

Generate PIN

POST /generate_pin

Send Pin to MSISDN.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Required
Type
Example
Description

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"
}

Verify PIN

POST /verify_pin

Verify the pin sent to the MSISDN

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Required
Type
Example
Description

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"
}

Last updated