# Verify SimCard

This service is used to verify if the SIMCard is valid, and get partner specific Promocode.

# Request Configuration

# Request Endpoint

/api/Activation/VerifySimcard

# Request Method

Post

# Request Headers

Name Type Description
client string Use bID returned from Login
apitoken string Use Token returned from Login

# Request Parameters:

Name Type Description
simnum string
  • Use SIM Card number located on the back of the SIM Card.
  • If using eSIM, leave empty (use "").
CountryId int Service country ID, must use 42.
verifytype string
  • If verifying for Prepaid service, use prepaid.
  • If verifying for Postpaid service, use postpaid.
  • If simnum is specified, leaving this empty is also fine.

# Request Body

None

# Sample Reqeust

# Sample Request URL

https://phoneboxapi.azurewebsites.net/api/Activation/VerifySimcard?simnum=66666666668888888888&countryid=42&verifytype=prepaid

# cURL

curl --location --request POST 'https://phoneboxapi.azurewebsites.net/api/Activation/VerifySimcard?simnum=66666666668888888888&countryid=42&verifytype=prepaid' \
--header 'client: 1234' \
--header 'apitoken: 1eMPGml82EhtyH0CSAw4RrLbEi3jjWA0'

# Python - Requests

import requests
url = "https://phoneboxapi.azurewebsites.net/api/Activation/VerifySimcard"
params = {
    'simnum': '66666666668888888888', 
    'countryid': '42',
    'verifytype': 'prepaid'
}

headers = {
    'client': '1234',
    'apitoken': 'foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'
}
response = requests.post(url, headers=headers, params=params)

print(response.text.encode('utf8'))

# NodeJs -Axios

var axios = require('axios');

var data = {};

const params = new URLSearchParams({
    simnum: '66666666668888888888', 
    countryid: '42',
    verifytype: 'prepaid'
}).toString();

const url = "https://phoneboxapi.azurewebsites.net/api/Activation/VerifySimcard" + params;

axios
    .post(url, data, {
    headers: {
        client: '1234',
        apitoken: 'foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'
    }
    })
    .then(res => {
        console.log(JSON.parse(res.data));
    })
    .catch(err => {
        console.log(err);
    });

# Response

# Success

return a JSON object containing below information

{
    "PromoCode": "MyPromoCode",
    "SimNum": "66666666668888888888",
    "Carrier": "R",
    "Type": "Prepaid",
    "CountryId": 42,
    "Currency": "CAD"
}

# Non-Success

Return null

reason: verifytype doesnt match with the SIM number

null

# Fail

Failed Authorization

reason: wrong login credential

{
    "Message": "Authorization has been denied for this request."
}
LastUpdated: 5/30/2024, 1:34:33 PM