Any authentication that works against the website will work against the REST API. In other words, if you are logged in with a browser you will be able to do API requests directly from the address bar.
If you are using some server-side scripting language, you need to send credentials through the HEAD tag, like in an example below:
curl -u username:password -c cf.log -b cf.log \
https://platform.oddbytes.com/api/v1/123/sourceTracking
API request
It's recommended to enable cookies during the API requests so you do not have to send credentials all the time (-b cf.log -c cf.log in this example).
For all requests account ID is a mandatory parameter and it's followed by API version parameter (/v1/accountID/methodName). You need to have API access enabled for a provided account.
In case you provide an invalid account ID, besides false response message, you will get Accounts parameter within response which contains all accounts with account IDs and API availability. List of Accounts is also possible to fetch through Accounts service:
GET Method
curl -b cf.log -c cf.log \
https://platform.oddbytes.com/api/v1/1744/Accounts
JSON Response
{
"success":true,
"data":[
{
"account_id":"1744",
"account_name":"YourAccountName",
"api_access":"ENABLED"
}],
"messages":[
{
"message":"Only accounts with api_access:'ENABLED' can use API",
"scope":"API",
"level":"info"
}]
}