question

ajain_he1i6ef avatar image
0 Likes"
ajain_he1i6ef asked

Oauth2 Authorize Code in Java microservice

Hi Team,

I am developing a microservice to get the orders details using fulfilment APIs. To use these API i need to get the auth code and then use it for getting token. My problem is that the API "https://auth.sandbox.ebay.com/oauth2/authorize" returns a login page where i need to enter the user name and password. Which is not possible in case of microservice.

Please let me know is there any alternate API to get the auth code.

Regards,

Aj



oauth2fullfillment api
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered

Hi @ajain_he1i6ef,

Getting a user access token is a 3 step process.

Please see all of the steps below:

- You need to construct an HTML request that will redirect the user to your application's Grant Application Access page for a getting user consent.
Ref: https://developer.ebay.com/api-docs/static/oauth-consent-request.html

- After successfully getting a user consent, you will get an authorization code returned by the consent request URL. You can use this authorization code for getting a User access token.
Ref: https://developer.ebay.com/api-docs/static/oauth-auth-code-grant-request.html

- An user access token is valid for two hours from the time it was generated. For continued access after the token expires, you must mint a new token using the associated refresh token.
Ref: https://developer.ebay.com/api-docs/static/oauth-refresh-token-request.html

You can not generate a user access token without getting the user consent.

Best regards,
eBay Developer Support

· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @sagar_developersupport,

I am sorry to say that, where all the companies/developers are moving towards automations and EBAY APIS are not automations friendly. For getting token this way, users wont be able to automate their applications , if user cant bypass web login steps. Also what is the use of providing the SDK if still you need to depends on the web login for user consent. I believe SDK should have one API to get the token and internally it should handle "n" number of steps to get the token.

I request Ebay to come up with some alternate APIs for automations.

Regards,

Aj

0 Likes 0 ·
ajain_he1i6ef avatar image
0 Likes"
ajain_he1i6ef answered

Hi @sagar_developersupport,

I am sorry to say that, where all the companies/developers are moving towards automations and EBAY APIS are not automations friendly. For getting token this way, users wont be able to automate their applications , if user cant bypass web login steps. Also what is the use of providing the SDK if still you need to depends on the web login for user consent. I believe SDK should have one API to get the token and internally it should handle "n" number of steps to get the token.

I request Ebay to come up with some alternate APIs for automations.

Regards,

Aj

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.