Authentication Token

FracTEL API endpoints except Create Auth Token endpoint, will require a valid authentication token in Request Headers. If you have your FracTEL account, you can use your user name and password and the Create Auth Token endpoint to get API token. Subsequent requests to the FoneStorm API are authorized by including a token header as shown below:

{
  "headers": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50Ij..."
  }
}

🚧

Invalid token or failure to include token in request headers would result it 401 Unauthorized error.

Please refer following code samples for better understanding.

Code Samples

curl --request GET \
  --url https://api.fonestorm.com/v2/fonenumbers \
  --header 'accept: application/json' \
  --header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50Ij...'
var data = null;

var xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.fonestorm.com/v2/fonenumbers");
xhr.setRequestHeader("accept", "application/json");
xhr.setRequestHeader("token", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50Ij...");

xhr.send(data);