Verify Electricity
Verify Electricity Meter number
get
{{base_url}}/verifyelect
Verify Meter no
Take a look at how you might do this:
cURL
NodeJS
PHP - cURL
Python
Dart
1
curl --location --request GET 'https://api.1app.online/v1/verifyelect?meterno=45022599083&provider=ABUJA' \
2
--header 'Authorization: Bearer PUBLIC_KEY'
Copied!
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://api.1app.online/v1/verifyelect?meterno=45020599183&provider=ABUJA',
5
'headers': {
6
'Authorization': 'Bearer PUBLIC_KEY'
7
},
8
formData: {
9
10
}
11
};
12
request(options, function (error, response) {
13
if (error) throw new Error(error);
14
console.log(response.body);
15
});
16
Copied!
1
$curl = curl_init();
2
3
curl_setopt_array($curl, array(
4
CURLOPT_URL => 'https://api.1app.online/v1/verifyelect?meterno=45020599183&provider=ABUJA',
5
CURLOPT_RETURNTRANSFER => true,
6
CURLOPT_ENCODING => '',
7
CURLOPT_MAXREDIRS => 10,
8
CURLOPT_TIMEOUT => 0,
9
CURLOPT_FOLLOWLOCATION => true,
10
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
11
CURLOPT_CUSTOMREQUEST => 'GET',
12
CURLOPT_HTTPHEADER => array(
13
'Authorization: Bearer PUBLIC_KEY'
14
),
15
));
16
17
$response = curl_exec($curl);
18
19
curl_close($curl);
20
echo $response;
Copied!
1
import requests
2
3
url = "https://api.1app.online/v1/verifyelect?meterno=45020599183&provider=ABUJA"
4
5
payload={}
6
files={}
7
headers = {
8
'Authorization': 'Bearer PUBLIC_KEY'
9
}
10
11
response = requests.request("GET", url, headers=headers, data=payload, files=files)
12
13
print(response.text)
14
Copied!
1
var headers = {
2
'Authorization': 'Bearer PUBLIC_KEY'
3
};
4
var request = http.MultipartRequest('GET', Uri.parse('https://api.1app.online/v1/verifyelect?meterno=45020599183&provider=ABUJA'));
5
6
request.headers.addAll(headers);
7
8
http.StreamedResponse response = await request.send();
9
10
if (response.statusCode == 200) {
11
print(await response.stream.bytesToString());
12
}
13
else {
14
print(response.reasonPhrase);
15
}
16
Copied!

Sample Response

1
{
2
"status": true,
3
"name": "IBRAHIM MARY OPE",
4
"minvend": 200,
5
"maxvend": 1000000,
6
"vendtype": "PREPAID",
7
"address": "4, ORAN STR 1, . Und St. Central Area"
8
}
Copied!