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
I cant do a POST request to paypal API #653
Comments
You need to authenticate with username and password using basic authentication. Also you're sending JSON with that request and the curl version uses "application/x-www-form-urlencoded ". Please read the documentation: |
@Spartano You solved the problem ? I'm trying to do the same thing and give me a 401 too and this message "Authentication failed due to invalid authentication credentials or a missing Authorization header." My code here:
|
I solved it! I made a Gist to show how I solved it if someone needs help: https://gist.github.com/TigaxMT/b57c11df3e4ebd0510858ec3df775efa |
Hi, mi issue is more of a question, i am tryng to make axios do a POST request that does the same thing that this curl does:
my code is this:
i am calling it from my localhost, and it gives me the error of 401. This is the link to the PAYPAL API https://developer.paypal.com/docs/integration/direct/make-your-first-call/
Reanding the docs i wasnt able to understand where to put the username and passowrd or how to set up the autorization to basicOuth
instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
what is AUTH_TOKEN? is a const? what value should i give it?
Anyway, thank you in advance.
The text was updated successfully, but these errors were encountered: