Generating/Refreshing Token and Checking Order Status Using REST API in Java
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working on an application for an organization. I want to be able to use code to generate an access token in Java and then use that token to get information about the latest customer order. Where can I find documentation or help on how to do this?
For some background, I am able to generate the token using curl and Postman (instructions here: https://developer.paypal.com/api/rest/authentication/), however, I am unsure how to write code in Java that would allow me to refresh the the token when needed. I tried using the code here, https://developer.paypal.com/braintree/docs/guides/extend/oauth/access-tokens/java, but I'm receiving an error that states "Value passed for clientSecret is not a valid clientSecret." I am using what I believe to be a sandbox account so not sure if that has anything to do with it. With regards to framework, I am using Java Spring for the project but am testing the Braintree code in a regular Java project. Overall, I want to be able to generate a key for my account and then use API calls to see whether an order went through and then use that information in my app to show an administrator information about customer purchases. Would really appreciate any help with where I can find Java code to generate the token and then get the order status for the latest order.
- Labels:
-
Payments REST APIs

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Which api can get oauth2.0 authorization_code? in REST APIs
- "System error. Please try again later" when connecting to paypal sandbox account with my android app in Sandbox Environment
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- p is not a function error using the example downloaded from Paypal in SDKs
- v2/payments/authorizations/{authorization_id} Request failed with status code 404 in REST APIs