0

I have trouble using the paypal api with my test app I am using pow_assent and using my own strategy... it sends me to the paypal page and everything works great until im redirected back to my site, it shows: "Something went wrong, and you couldn't be signed in. Please try again." and it shows this error on terminal [error] Strategy failed with error: %Assent.RequestError{error: :invalid_server_response, message: "Server responded with status: 401\n\nHeaders:\ncache-control: max-age=0, no-cache, no-store, must-revalidate\nconnection: keep-alive\ndate: Sun, 01 Aug 2021 02:44:29 GMT\nvia: 1.1 varnish, 1.1 varnish\naccept-ranges: bytes\nserver: nginx/1.14.0 (Ubuntu)\ncontent-length: 244\ncontent-type: application/json\npaypal-debug-id: 53f3a821ee6e1\nstrict-transport-security: max-age=31536000; includeSubDomains\nedge-control: max-age=0\nx-served-by: cache-dfw18678-DFW, cache-pwk4959-PWK\nx-cache: MISS, MISS\nx-cache-hits: 0, 0\nx-timer: S1627785869.405094,VS0,VE164\n\nBody:\n%{\"links\" => [%{\"href\" => \"https://developer.paypal.com/docs/api/overview/#error\", \"rel\" => \"information_link\"}], \"message\" => \"Authentication failed due to invalid authentication credentials or a missing Authorization header.\", \"name\" => \"AUTHENTICATION_FAILURE\"}\n"} I have tried to fix this... but haven't figured it out yet. Would appreciate some help

Adam Millerchip
  • 20,844
  • 5
  • 51
  • 74
user15690889
  • 158
  • 1
  • 5
  • What exactly did not you understand in the error message _“Authentication failed due to invalid authentication credentials or a missing Authorization header.”_? – Aleksei Matiushkin Aug 02 '21 at 04:54
  • thats the thing, everything is correct in the header, I checked multiple times... The error message would change to ```[error] Strategy failed with error: %Assent.CallbackCSRFError{message: "CSRF detected with param key \"state\""}``` but then it would show the one above. – user15690889 Aug 02 '21 at 04:59
  • Does this answer your question? [Invalid Client with paypal api, client authentication failed using HTTPoison.post!/3](https://stackoverflow.com/questions/68625681/invalid-client-with-paypal-api-client-authentication-failed-using-httpoison-pos) – Adam Millerchip Aug 04 '21 at 04:13
  • Looks to be the same issue as above that the OP "figured this out like 2 days ago, but thanks for commenting anyways". – Adam Millerchip Aug 04 '21 at 04:18

0 Answers0