Skip to main content
Question

Authentication with POST Webhook for Paypal

  • 11 June 2024
  • 9 replies
  • 41 views

I am using Paypal’s API documentation here.

I’m trying to do a POST to the authentication endpoint to be granted an access token to use in future requests, however I keep getting a 401.

Here’s my setup in Zapier: 

Note: I did encode my CLIENT_ID:CLIENT_SECRET into Base64 (using https://www.base64encode.org/) prior to testing this call.

Not sure where I went wrong? 

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

9 replies

Userlevel 7
Badge +14

Hi @ential 

Did you use a pipe | to separate the un/pw as indicated by the field description?

 

Hi there @Troy Tessalone 

I did use a pipe | to separate username and password, then encoded it but no luck…

Any other suggestions?

Userlevel 7
Badge +14

@ential 

Try w/o encoding the value.

I did try that without any luck.

I still get 401.

Have you tried this step yourself Troy to get an access token?

Userlevel 7
Badge +14

@ential 

Perhaps try using the production API endpoint.

 

Zapier will handle the encoding for Basic Auth

 

Hey @Troy Tessalone Correct me if I’m wrong, but I am using the production endpoint in my initial screenshot in my first post?

 

Userlevel 7
Badge +14

@ential 

I was able to generate a user token.

 

 “sandbox” is used for testing.

Check your PayPal Developer Portal.

 

What’s the production API endpoint then?

 

I couldn’t see that - but also wasn’t in Sandbox myself. Your screenshot above also has “sandbox” in it?

Userlevel 7
Badge +14

@ential 

In the PayPal API docs: https://developer.paypal.com/api/rest/requests/