New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supplied examples: "Must supply a valid HTTP Basic Authorization header" #33
Comments
Hi @philipjohn, You need to ensure that in this line you correctly replace 'your API key' with the actual ApiKey from your account: $auth = array('api_key' => 'your API key'); If you have, and it's still not working, it's likely that instead of the ApiKey you're using a ListID or ClientID. The ApiKey is obtained by clicking on the "Account Settings" link when you're logged into your account. If you're still having troubles you'll need to log a support request so we can look at your individual case. |
Hi @itgoeslikethis @philipjohn, I am having similar issue.
Response which I am getting,
I have checked API key as well. It's correct. Please let me know the resolution if you had it. |
Is this exact excerpt from your code?
|
Hi @nijeshhirpara , Unfortunately there could be a number of reasons that you're getting that response, but it in some way it indicates something wrong with the
Do you think it could be any of those? |
I am using the supplied example to test the API:
However, the response I get is;
I have also tried using the supplied example for adding subscribers, with the same result.
How do I set the Basic Auth header? Given the docs say that Basic Auth simply requires the API key as the username and a blank password, I assumed the library would handle that if I just give it an API key, as the samples do.
The text was updated successfully, but these errors were encountered: