PayPal (and Telstra) API and OAuth2 Custom Token

Hi All,

I’m trying to implement an import of invoices from PayPal for authenticated accounts. After some searching around and much hair pulling, I found this:

But I’m wondering if it’s still the right thing to do (I’ve tried the password flow API option, too, to no success).

I’m getting an error message relating to authentication but potentially that it’s missing data. I’ve tried the same settings in Postman and it works fine. The difference between my attempts and the tip that I’ve linked can be seen in the attached screenshot, the short version is:

Tip:
grant_type=client_credentials&client_id=<client_id>&secret=

Mine:
{
“grant_type”:“client_credentials”,
“client_id”: <client_id>,
“secret”:
}

I have tried the method for the JSON body that’s in the tip, too but I’m getting the same authentication error.

It seems the new Telstra Dev site uses a similar process and if I can get this working, I can apply it to that API as it uses the same process of an expiring access_token being applied to API calls for sending/receiving SMS messages.

Has anyone done this successfully? Could they share their config settings and how it works? If not, can anyone help?

I have tried searching through the forums but the tip page is the only relevant one that I’ve found which is somewhat useful and the user manual isn’t really helpful at all (https://manual.bubble.is/building-plugins/adding-api-connections.html#oauth2-custom-token). Along with that is conflicting information around which API choice to make and none of them show it to be working where an access_token variable is returned for use.

Can anyone offer some advice?

I wouldn’t call myself an expert on Paypal, but I did monkey around with it for a bit and was able to retrieve transactions before I moved over to Plaid, so here’s my understanding:

Paypal does not yet allow for standard oauth authentication on behalf of other users without specifically entering their partner program. Their documentation is mixed on this message, but my interpretation is that you can do an oauth type connection for your own account, but not on behalf of others. That being said (and considering my limited knowledge,) if you use the login with social action in bubble, this can be a way to make it happen for your users. Once you have your users logged in via Paypal, you can setup API calls using the api connector and likely do what you need. I was able to import historical transactions for users and store that in a local bubble db.

There are probably more experienced users of paypal out there, and I will defer to them, but wanted to share what I personally experienced.

–Ken

Ken, your reply is appreciated. The logging in via paypal first is a step I’d not considered (and should have), so I will give that a go and report back with my efforts.

This topic was automatically closed after 70 days. New replies are no longer allowed.