-
Notifications
You must be signed in to change notification settings - Fork 89
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
SPARKPOST return 401 Unauthorized #180
Comments
Hi, So ! I solved problem with support. So, if someone is in the same case, just open file SparkPost.php in vendor/sparkpost/sparkpost/lib/SparkPost and replace 'host' => 'api.sparkpost.com', The problem is due to the location of my Spark account in Europe. PROBLEM SOLVED |
Or you could inject the host option when creating the
That way you wouldn't need to change third party library and also remember to re-apply your change when you upgrade to a newer version of the library. |
In case anyone is having the same problem using the node library. I know this is the pho, but is the first in google results. The solution is to add the param "origin" with the value: "https://api.eu.sparkpost.com:443" like so:
as stated in the dos: https://github.com/SparkPost/node-sparkpost |
Hi everyone,
I'm trying to implement PHP method from instructions in this github to use sparkpost on my website. So I configure the tool from dashboard and all is valid. Now my function in PHP
`
use SparkPost\SparkPost;
use GuzzleHttp\Client;
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
`
And the server return
401 Message Unauthorized. I don't understand why. I contact support who tell me "Please ensure that you are using the EU API end point: https://api.eu.sparkpost.com/api/v1"
But there is nowhere where I can put this line in my code...
for your help, THANK YOU VERY Much !
The text was updated successfully, but these errors were encountered: