Instructions for obtaining an "Access Token" make no sense to me whatsoever.

Arbu2
Contributor
Contributor

So I've set my website up so that people can take out a subscription, and that works fine. But subscribers are going to expect to be able to see details of their subscription, and be able to cancel it if necessary. So I need to make API REST calls. I have found my Client ID and secret. I understand that I need to use them to obtai an access token. The instructions for doing that state to download something called "Postman". https://developer.paypal.com/docs/api/get-an-access-token-postman/ . But this process seems to bear no relation to what I'm trying to do. Firstly, the instructions say to download Postman. But there's nothing on that website to download - it's more like a platform. Then the instructions say that I need to renew the access token every fifteen minutes. That means it will have to be done on the server, I'm obviously not going to be doing it manually on my computer. So does that mean that I have to upload Postman to the server (assuming I can figure out how to download it to start with)?

 

It all seems incomprehensible. Am I looking at the wrong instructions?

Login to Me Too
1 REPLY 1

Arbu2
Contributor
Contributor

OK, I'm making some progress. I can convert the curl code into javascript using this service https://reqbin.com/req/java/c-w7oitglz/convert-curl-to-http-request and then I can get an access token. But that raises two questions:

 

1. The converted code contains a long string that seems to bear no relation to the ClientID and secret that I use in the curl code. Does this mean that I am reliant on the reqbin service to produce this if I want to use javascript instead of Python? and

2. Do I need to run the code on the server rather than the browser? Otherwise I would have thought that anyone who inspects my code could get details of all subscriptions on my Paypal account, which I wouldn't want.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.