Manually grant a Third-Party integration

231 Views Asked by At

I'm looking to integrate paypal as a payment gateways for my customers.

I know that to have a third-party permission, you can use RequestPermissions which will return a token that you can use to ask permission to the user, then you will have the access token and secret token to call Paypal API.

But in my integration I cannot use redirect and callback, so I need my customer to grant permission manually as describe in paypal documentation : https://developer.paypal.com/docs/classic/admin/third-party/

My question is, after that my customer add my app in his third-party permission, how can i retrieve the access token / secret token of the user with just his paypal's email ? Or maybe, I don't need it and I can call Paypal Api just with my customer's email?

Thanks for your help.

2

There are 2 best solutions below

3
On BEST ANSWER

You can do it manually by logging in to your PayPal account, going into the profile, and then into API Access (or it might say Request API Credentials).

Once in there, you'll choose Grant API Permissions, and then you would enter the API username of the application you're granting permissions for, and then check all the boxes for the permissions you want to grant.

Of course, you'd have your users do this in their accounts and use your API username to grand permissions.

Then you just send their PayPal email address in your API request in the SUBJECT parameter the same you do the un/pw/signature.

4
On

Firstly, you can go on https://developer.paypal.com/docs/classic/lifecycle/ug_sandbox/ link and follow the instruction for creating the sandbox account. After creating account you can get a credential.