Integrations
eBay
Set up eBay OAuth for marketplace selling and order management
Overview
Section titled “Overview”Connect the application’s users to eBay for marketplace selling, inventory management, order fulfillment, and account data.
| Property | Value |
|---|---|
| Provider ID | ebay |
| Category | E-commerce |
| PKCE | Supported |
| Token refresh | Automatic |
| Environments | Production and Sandbox |
| Redirect URI | Shown in Developer Portal |
Sandbox vs production
Section titled “Sandbox vs production”eBay’s Sandbox is a separate deployment with its own consent page (auth.sandbox.ebay.com), token endpoint and API hosts (api.sandbox.ebay.com, apiz.sandbox.ebay.com). An application has a separate keyset (App ID and Cert ID) and a separate RuName for each environment (eBay authorization guide), and a token works only in the environment that issued it. Users consent with eBay Sandbox test users, which you create in the developer portal, not real eBay accounts.
To use the Sandbox, configure the Sandbox keyset and the Sandbox RuName with the environment set to Sandbox:
- Developer Portal: set the Environment selector on the eBay configuration form to Sandbox, and enter the Sandbox RuName in the RuName field.
- CLI: pass
--environment sandbox:
alter providers create --app <app> --provider ebay \ --environment sandbox \ --client-id <sandbox-app-id> --client-secret - \ --redirect-uri-alias <sandbox-runame> \ --scopes https://api.ebay.com/oauth/api_scope,https://api.ebay.com/oauth/api_scope/commerce.identity.readonly \ --redirect-uri https://your.app/callbackThe save-time credential check verifies the keyset against the environment you selected. A sandbox configuration can only reach the Sandbox API hosts; it cannot call the live API. Scope values keep their https://api.ebay.com/oauth/... form in the Sandbox, but eBay may grant a keyset different scopes in each environment, so request the scopes the Sandbox keyset holds.
To go live, switch the same configuration to the Production keyset and the Production RuName together (alter providers update --app <app> --provider ebay --environment production --client-id <production-app-id> --client-secret - --redirect-uri-alias <production-runame>, or the Developer Portal).
Step 1: Create an eBay OAuth App
Section titled “Step 1: Create an eBay OAuth App”Go to the eBay Developer Portal
Navigate to developer.ebay.com/my/keys and sign in.
Create a new application
Click Get a Keyset and fill in the application details. Use the Production keyset for live data or the Sandbox keyset for testing.
Register the callback URL and get its RuName
Click User Tokens next to the App ID of the keyset you are configuring, then open Get a Token from eBay via Your Application. The first time, click You have no Redirect URLs. Click here to add one, confirm the legal address, and click Continue to create RuName. Enter a Display Title and Privacy Policy URL, paste the Alter callback URL from the Developer Portal into Auth Accepted URL, and save. eBay assigns the registration a RuName (Redirect URL name, for example Davy_Developer-DavyDeve-DavysT-euiukxwt). eBay issues one RuName per environment, so copy the RuName of the keyset’s environment: eBay requires the RuName, not the URL, in every authorization request, and Alter sends it for you once it is entered below.
Get credentials
Copy the keyset’s Client ID (App ID) and Client Secret (Cert ID).
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add eBay provider
Go to OAuth Providers > Add Provider > eBay.
Enter credentials
- Client ID: Paste the eBay App ID
- Client Secret: Paste the eBay Cert ID
- RuName: Paste the Redirect URL name from Step 1. The field is required for eBay; the configuration cannot be saved without it.
- Environment: Sandbox for a Sandbox keyset and RuName, Production for Production ones
Select scopes
Choose the scopes the application needs.
Save
Click Save. The provider is now active.
Available Scopes
Section titled “Available Scopes”| Scope | Description |
|---|---|
https://api.ebay.com/oauth/api_scope | Access to general eBay API endpoints |
https://api.ebay.com/oauth/api_scope/sell.marketing | Access to selling marketing tools and promotions |
https://api.ebay.com/oauth/api_scope/sell.inventory | Access to inventory and listing management |
https://api.ebay.com/oauth/api_scope/sell.fulfillment | Access to order fulfillment and shipping |
https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly | View the user’s order fulfillments |
https://api.ebay.com/oauth/api_scope/sell.finances | View and manage payment and order information, including initiating refunds |
https://api.ebay.com/oauth/api_scope/sell.payment.dispute | View and manage disputes and related details (including payment and order information) |
https://api.ebay.com/oauth/api_scope/sell.account | Access to seller account settings and policies |
https://api.ebay.com/oauth/api_scope/commerce.identity.readonly | View the user’s basic eBay account information (immutable user ID) |
- eBay uses full URL strings as scope values rather than short names.
- eBay does not accept the callback URL as
redirect_uri; it expects the RuName assigned to the registered Auth Accepted URL, and with the URL in its place eBay rejects the request before any consent screen. Enter the RuName in the eBay configuration (Developer Portal, oralter providers create --provider ebay --redirect-uri-alias <RuName>with the CLI; switching an Alter-managed eBay configuration to custom credentials requires it too) and Alter sends it in every authorization request and token exchange. - The keyset, the RuName and the Environment setting must all name the same eBay environment (see Sandbox vs production).
- Disconnecting in Alter revokes a Production connection’s refresh token at eBay and deletes Alter’s copy; Alter skips the revocation while another connection in Alter holds the same eBay user under the same App ID. eBay publishes a revocation endpoint for Production only (its authorization guide lists no Sandbox one), so a Sandbox connection’s token is not revoked at eBay when it is disconnected; Alter deletes its copy.
- See the eBay OAuth documentation for more details.
Policy-cataloged operations
Section titled “Policy-cataloged operations”Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.
| Operation ID | Families | Method | Provider path |
|---|---|---|---|
issueRefund | payment | POST | /order/{order_id}/issue_refund |
acceptPaymentDispute | payment | POST | /payment_dispute/{payment_dispute_id}/accept |
contestPaymentDispute | write | POST | /payment_dispute/{payment_dispute_id}/contest |
addEvidence | write | POST | /payment_dispute/{payment_dispute_id}/add_evidence |
updateEvidence | write | POST | /payment_dispute/{payment_dispute_id}/update_evidence |
uploadEvidenceFile | write | POST | /payment_dispute/{payment_dispute_id}/upload_evidence_file |
createShippingFulfillment | write | POST | /order/{orderId}/shipping_fulfillment |
fetchEvidenceContent | read | GET | /payment_dispute/{payment_dispute_id}/fetch_evidence_content |
getActivities | read | GET | /payment_dispute/{payment_dispute_id}/activity |
getOrder | read | GET | /order/{orderId} |
getOrders | read | GET | /order |
getPaymentDispute | read | GET | /payment_dispute/{payment_dispute_id} |
getPaymentDisputeSummaries | read | GET | /payment_dispute_summary |
getShippingFulfillment | read | GET | /order/{orderId}/shipping_fulfillment/{fulfillmentId} |
getShippingFulfillments | read | GET | /order/{orderId}/shipping_fulfillment |