Use of the API requires API Authentication Credentials. As well, the associated API Authentication credentials must be coming in from an Authorised IP address with a valid username and password.
API Authentication Credentials, IP address authorisation, username and password can be requested through a ticket from Sive.Host client area with ticket subject: API Authentication.
Authentication is required for each API request.
Authenticating with Basic Authentication
To authenticate, users must provide:
-
Username:
Ikhaka
-
Password:
Mph#th9mi$
These credentials are passed via Basic Authentication in the HTTP request.
Authenticating with API Credentials
API requests will be authenticated based on the request parameters key
and secret
as provisioned when your API Authentication request ticket is answered within the Sive.Host client Area, these must be included in the request payload.
$api_key = 'D4j1dKYE3g4R0VROOPCGyJ9zRwP0ADJIv';
$api_secret = 'F1CKGXRIpUylMfsrig3mwwdSdYUdLiFlo';
$postfields = array(
'identifier' => $api_key,
'secret' => $api_secret,
'action' => $api_call,
'responsetype' => $response_type,
);
IP restriction
The IP address you will be making the API requests from, needs to be in our list of of authorised IPs. You request for your IP address to be authorised in the same ticket you request for the API key, API secret, Username and Password. Requests from unauthorised IPs will be rejected.
$username = 'Ikhaka';
$password = 'Mph#th9mi$';
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); // Basic Authentication
A valid key and secret, IP, username and password (passed via Basic Authentication in the HTTP request) combination passed in this way will also result in successful authentication.