URL: https://hashdecoder.co.ke/api/decode
METHOD: POST
Request Parameter | Type | Description |
---|---|---|
hashes | Array | List of hashes to be decoded into mobile numbers. |
Response Parameter | Type | Description |
---|---|---|
hash | String | The hash value that was provided in the request. |
mobile | String | The decoded mobile number corresponding to the hash. |
Response Error Code | Meaning |
---|---|
200 | Success. The request was processed successfully. |
400 | Bad Request: Missing parameters. This error appears when not all mandatory parameters are provided. |
401 | Authentication error: Invalid API key. This error occurs if the provided API key is unknown or expired. |
402 | Low Balance. Please recharge to make requests. |
403 | An error occurred while fetching data. |
404 | Unauthorized access. This error occurs when the request lacks proper authentication. |
419 | Too Many Requests: Rate limit exceeded. |
500 | Internal server error. A generic error indicating an issue on the server side. |
Authorization: Bearer < your-accounts-api-token>
{
"hashes": [
"19715418b8d85f13e084b779185e158703ee42188420fd254ad39f3c912a34f4",
"19715418b8d85f13e084b77hhweidbukeawfd254ad39f3c9cdddcddcddc8420f"
]
}
[
{
"hash": "19715418b8d85f13e084b779185e158703ee42188420fd254ad39f3c912a34f4",
"mobile": "254725164293"
},
{
"hash": "19715418b8d85f13e084b77hhweidbukeawfd254ad39f3c9cdddcddcddc8420f",
"mobile": "254723350761"
}
]
curl -X POST https://hashdecoder.co.ke/api/decode \ -H "Authorization: Bearer 1|S0UDLbvixay1MQCCyulQWSZjIX39ADvNDtDpU2SA95c291c3" \ -H "Content-Type: application/json" \ -d '{ "hashes": [ "017eeddaa0ddea5ed4fe550aa03c1626d7a59c2126a6a14fd0a66a86a98f5448" ] }'
POST /api/decode HTTP/1.1
Host: hashdecoder.co.ke
Content-Type: application/json
Authorization: Bearer 7|QtzTHM7p3SsUeZT7rz2yi14J3CysnKOhwIqn5Wu9cd16c26a
Content-Length: 100
{
"hashes": [
"017eeddaa0ddea5ed4fe550aa03c1626d7a59c2126a6a14fd0a66a86a98f5448"
]
}
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer 7|QtzTHM7p3SsUeZT7rz2yi14J3CysnKOhwIqn5Wu9cd16c26a");
const raw = JSON.stringify({
"hashes": [
"017eeddaa0ddea5ed4fe550aa03c1626d7a59c2126a6a14fd0a66a86a98f5448"
]
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://hashdecoder.co.ke/api/decode ", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
const axios = require('axios');
let data = JSON.stringify({
"hashes": [
"017eeddaa0ddea5ed4fe550aa03c1626d7a59c2126a6a14fd0a66a86a98f5448"
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://hashdecoder.co.ke/api/decode ',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer 7|QtzTHM7p3SsUeZT7rz2yi14J3CysnKOhwIqn5Wu9cd16c26a'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://hashdecoder.co.ke/api/decode ',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"hashes": [
"017eeddaa0ddea5ed4fe550aa03c1626d7a59c2126a6a14fd0a66a86a98f5448"
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer 7|QtzTHM7p3SsUeZT7rz2yi14J3CysnKOhwIqn5Wu9cd16c26a'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import http.client
import json
conn = http.client.HTTPSConnection("hashdecoder.co.ke")
payload = json.dumps({
"hashes": [
"017eeddaa0ddea5ed4fe550aa03c1626d7a59c2126a6a14fd0a66a86a98f5448"
]
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer 7|QtzTHM7p3SsUeZT7rz2yi14J3CysnKOhwIqn5Wu9cd16c26a'
}
conn.request("POST", "/api/decode ", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))