question

amazing_home avatar image
0 Likes"
amazing_home asked

Grant type issue with background process.

Hello everyone,

Before everything is fine. LMS is working well.

Ebay now forced to migrate to the Sell Feed API with Oauth2. There are 2 types: Authorization Code Grant Type and Client Credential Grant Type. My need is download active listing, yeah....I have to use Authorization Code Grant Type, no choice. Sell Feed API is nice. But I got a trouble just because my application is running background without UI. How to obtain the user's consent? Are there anyway to add more scope to Client Credential Grant Type?

Anyone has the same situation? Any help with what might be going wrong would be great.

Thanks in advance.

tokenoauth2oauthc#authorization
· 1
10 |600

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

there is no need to have a ui to get a refresh token, you can login via your eBay developer website, grab the "code" (you get after the login) and create a request (via code, cli, postman, whatever) and get a refresh token. with that refresh token you can fetch a new access token whenever it's needed, as long the refresh token didn't expire. and creating a tiny website to make oauth running yourself isn't a big deal, maybe this helps somehow.
0 Likes 0 ·

1 Answer

·
jitendra_developersupport avatar image
0 Likes"
jitendra_developersupport answered

Hi @amazing_home,


You cannot generate a user access token without getting the user consent. 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


Best regards,
eBay Developer Support

10 |600

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.