Get Token
https://{companyusername}.bytebets.com.ng/api/login
User Get Token using username and password
Parameters
Field | Required | Description |
---|---|---|
username | true | Can be your registered email address or your username |
password | true | The Password of your account |
Any parameter within curly braces in the URL must be changed to what it describes
Example Code for Get Token
curl -k -H "Content-Type: application/json"\
-X -d '{"field1":"abc","field2":"abc"}' POST 'https://{companyusername}.bytebets.com.ng/api/login'
var jsondata = {"field1": "xyz","field2": "abc"};
var settings = {
"async": true,
"crossDomain": true,
"url": https://{companyusername}.bytebets.com.ng/api/login,
"method": POST,
"headers": {
"content-type": "application/json",
"cache-control": "no-cache"
},"processData": false,
"data": JSON.stringify(jsondata)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = {
method: POST,
url: https://{companyusername}.bytebets.com.ng/api/login,
headers:
{ 'cache-control': 'no-cache',
},
"body": { field1: "xyz", field2: "abc" },
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
HttpResponse
response = Unirest.post("https://{companyusername}.bytebets.com.ng/api/login")
.header("cache-control", "no-cache")
.body("{"field1":"xyz","field2":"abc"}").asString();
$request = new HttpRequest();
$request->setUrl('https://{companyusername}.bytebets.com.ng/api/login');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'cache-control' => 'no-cache','content-type' => 'application/json'
));
$request->setBody("{"field1":"xyz","field2":"abc"}");
}}
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}