Skip to main content

API Access

Posted by countrdd on Tue, 12/26/2017

Getting
Unauthorized
Unauthorized
A password is required to access this
web server. Please try again.

when accessing the apis....

What is the format of the Basic Auth Token?

xxxx:yyyy - xxxx username yyy password
or does it have to be

username:akdlfakdfkaf,password:3094034?


Submitted by matthewmalk248 on Wed, 01/10/2018 Permalink

What framework/platform are you using? I got it working using a base64_encode of username:password with basic authorization and also with php using curl
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");