Authentication
When humans interact with a website or service that requires authentication with a username and password, the webbrowser will simply show a dialog to enter these details. However, when the calls come from an application, this isn’t possible.
For this purpose, a standard exists, called “Basic Authentication”. More information about this technique can be found in an article on Wikipedia.
Including authentication in the request header
In order to send the authentication data with the request, the call needs to include this in the request header.
Here is an example of how this is implemented in our own interactive demo (PHP):
$user and $password are variables that get values assigned elsewhere in the code, they’re not hard coded for obvious reasons.