2 posts / 0 new
Last post
countrdd
countrdd's picture
Joined: 2015/10/03
Points: 20

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?

matthewmalk248
matthewmalk248's picture
Joined: 2015/08/09
Points: 20

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");