When you navigate to get your application keys, you can quickly generate a short-lived (two hours or less) Application access token or User Access token through the user interface.
Getting Application access tokens via the Developer Portal
To get an Application access token:
- Navigate to your Application Keys page on the eBay Developer Portal.
- Next to the App ID listing of the environment you want to generate a token for, click the User Tokens link.
- On the resulting page, click the Get OAuth Application Token link, an example which is highlighted in the following screen:
Getting an Application token through the Web flow
You can use this Application token to make requests to the APIs in the environment for which the token was generated.
Getting User access tokens via the Developer Portal
You can also generate a User access token through the Developer Portal.
To generate a User access token through the Developer Portal:
- Navigate to your Application Keys page on the eBay Developer Portal.
- Next to the App ID value (for Production or Sandbox environment), click the User Tokens link.
- In the Get a User Token Here section, select the OAuth (new security) radio button, then click the sign-in button.
If you are generating a Production user token, a real eBay user's credentials will be provided. If you are generating a Sandbox user token, a Sandbox test user's credentials will be provided. - On the Grant Application Access page (which is determined by the Accept URL setting), click the Agree button.
The User access token is returned.
You can use this User token to make requests to the APIs in the environment for which the token was generated. However, because the User access token is short lived, you will likely want to programmatically generate your User tokens, including using the Refresh token to update your User tokens after they expire. See Using a refresh token to update a User access token.