Find the answer to your question
Published: February 22 2013, 6:14:00 AMUpdated: November 28 2020, 10:48:49 PM
This article will help you to implement Auth and Auth by adding a jar file and 2 lines of code.
This works only with applications that use eBay SDK for Java
Steps to follow
1. Download the attached jar file ebayauthandauth.jar and add it to the build path.
2. In your code, add the line EbayAuthAndAuth.initiateAuthnAuth(appID, devID, certID, ruName); and pass the parameters accordingly.
The above line of code opens a browser window and presents the ebay production/sandbox login page. The user has to login to authenticate the keyset.
3. In your code, add the line String userToken= EbayAuthAndAuth.getUserToken();
The above line of code fetches the user token which should be saved for future use.
4. By default, the above code works for production. Add the line EbayAuthAndAuth.setEnvironment(Environment.SANDBOX); if it is for Sandbox.
A java file AuthAndAuthDemo.java is attached, which demonstrates the usage. Running AuthAndAuthDemo.class opens a GUI.
How well did this answer your question?