Usama Mukarram
Usama Mukarram

Reputation: 21

can you tell how to generate ebay user token?

enter image description here getting following error

i add url parameters client_id,redirecturl,scope and response type but getting this error

{
    "error_id": "invalid_request",
    "error_description": "Input request parameters are invalid.",
    "http_status_code": 400
}{
    

Upvotes: 0

Views: 1256

Answers (1)

Bench Vue
Bench Vue

Reputation: 9320

User access token Steps

#1 Check App Key

#2 Registry User

#3 Get User Token

#4 API call

#1 Check App Key after Registry App

https://developer.ebay.com/my/keys

enter image description here

#2 Registry User - once if not user registry

I tested in sandbox, If you use production, needs to change production URL

https://developer.ebay.com/sandbox/register

enter image description here

#3 Get User Token

Sign in from developer portal

https://developer.ebay.com/

enter image description here

Click Sign In

enter image description here

Enter e-mail of user

enter image description here

Enter password of user

enter image description here

Finally Got the user access-token enter image description here

#4 API call

API call with #3 user access token. In this case, user can't get the inventory due to limited scope for inventory. But I shows how to use user-token to call API.

Using Postman enter image description here

Using API explorer

https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0

enter image description here

App (Client) access token Steps

Documentation in here

enter image description here

You needs three information

#1 Token endpoint

sandbox - using test, use this at this time

https://api.sandbox.ebay.com/identity/v1/oauth2/token

production - using production

https://api.ebay.com/identity/v1/oauth2/token

#2 Get your cleint id and client secret

https://developer.ebay.com/my/keys

AppID (=Client ID) & Cert ID (= Cleint Secret)

enter image description here

#3 Enter #1/ #2 information in to Postman

#1 -> into URL with POST method Select Authrization tab and select Basic Auth Type #2 -> Paste client id into Username and cleint secret into password

enter image description here

Change the Body tab and select x-www-form-urlencoded

Then key -> grant_type , value -> client_credentials

Detail Steps

Step by Step from #1 to #10.

Token URL

https://api.sandbox.ebay.com/identity/v1/oauth2/token

Input Body

grant_type
client_credentials

enter image description here

#4 Finally click Send button, then can get access token.

enter image description here

enter image description here

Upvotes: 2

Related Questions