# ebay_exchange_authorization_code

Exchange an OAuth authorization code for access and refresh tokens. This completes the OAuth 2.0 Authorization Code grant flow. After the user authorizes the application using the URL from ebay_get_oauth_url, eBay redirects back with an authorization code in the URL. Use this tool to exchange that code for tokens that can be used to make API calls. The tokens will be automatically stored and used for subsequent API requests.\n\n

Agent View of the PolicyLayer registry record for `ebay_exchange_authorization_code`. HTML page: https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-exchange-authorization-code

## Facts

- Tool: `ebay_exchange_authorization_code`
- Server: Ebay (`yosefhayim/ebay-mcp`) — https://policylayer.com/tools/yosefhayim-ebay-mcp.md
- Homepage: https://github.com/YosefHayim/ebay-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ebay_exchange_authorization_code",
    "arguments": {}
  }
}
```

## Why ebay_exchange_authorization_code is rated Medium

This tool completes an OAuth flow and stores credentials (tokens) that grant API access. It writes/stores authentication tokens persistently. While it doesn't directly move money or delete data, it creates persistent authorization credentials that could be misused to perform any action on the user's eBay account, making it high severity.

From the tool's own definition: "Exchange an OAuth authorization code for access and refresh tokens... The tokens will be automatically stored and used for subsequent API requests."

## Use case

AI agents use ebay_exchange_authorization_code to create or update resources in Ebay, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Ebay environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Ebay:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "ebay_exchange_authorization_code": {
      "limits": [
        {
          "counter": "ebay_exchange_authorization_code_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Ebay (301)

- `ebay_bulk_cancel_packages` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-bulk-cancel-packages.md
- `ebay_bulk_delete_ads_by_inventory_reference` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-bulk-delete-ads-by-inventory-reference.md
- `ebay_bulk_delete_ads_by_listing_id` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-bulk-delete-ads-by-listing-id.md
- `ebay_bulk_delete_packages` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-bulk-delete-packages.md
- `ebay_cancel_bundle` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-cancel-bundle.md
- `ebay_cancel_package` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-cancel-package.md
- `ebay_clear_tokens` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-clear-tokens.md
- `ebay_delete_ad` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-ad.md
- `ebay_delete_ads_by_inventory_reference` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-ads-by-inventory-reference.md
- `ebay_delete_campaign` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-campaign.md
- `ebay_delete_email_campaign` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-email-campaign.md
- `ebay_delete_fulfillment_policy` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-fulfillment-policy.md
- `ebay_delete_inventory_item` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-inventory-item.md
- `ebay_delete_inventory_item_group` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-inventory-item-group.md
- `ebay_delete_inventory_location` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-inventory-location.md
- `ebay_delete_item_price_markdown_promotion` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-item-price-markdown-promotion.md
- `ebay_delete_item_promotion` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-item-promotion.md
- `ebay_delete_notification_destination` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-notification-destination.md
- `ebay_delete_notification_subscription` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-notification-subscription.md
- `ebay_delete_notification_subscription_filter` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-notification-subscription-filter.md
- `ebay_delete_offer` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-offer.md
- `ebay_delete_package` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-package.md
- `ebay_delete_payment_policy` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-payment-policy.md
- `ebay_delete_product_compatibility` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-product-compatibility.md
- `ebay_delete_report_task` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-report-task.md
- `ebay_delete_return_policy` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-return-policy.md
- `ebay_delete_sales_tax` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-sales-tax.md
- `ebay_delete_sku_location_mapping` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-delete-sku-location-mapping.md
- `ebay_end_listing` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-end-listing.md
- `ebay_withdraw_offer` — Destructive — https://policylayer.com/tools/yosefhayim-ebay-mcp/ebay-withdraw-offer.md
- …and 271 more: https://policylayer.com/tools/yosefhayim-ebay-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=yosefhayim-ebay-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/yosefhayim-ebay-mcp
