• Knowledge Base
  • Release Notes
  • Glossary
  • Knowledge Base
  • Release Notes
  • Glossary
Home/KnowledgeBase/API/How Do I Use The SellerLegend API?

How Do I Use The SellerLegend API?

14 views 0

🚀 What Is The SL API Used For?

  • An API (Application Programming Interface) enables communication between applications.
  • SellerLegend’s API lets your app connect directly to SellerLegend, allowing you to download SL data for custom use.

🛠️ Step-by-Step Setup Guide

1️⃣ Register Client on SellerLegend

  • Go to SellerLegend → Admin → Developers and register your application.

  • Click on Create New Client
  • This generates a Client ID and Client Secret—credentials required for API access.

  • Guest users cannot register clients or make API calls.


2️⃣ Redirect for Authorization

  • SellerLegend uses the OAuth 2.0 authorization pattern.

  • The consuming application is supposed to request an authorization code from SellerLegend.
  • The consuming application should make a redirect request to SellerLegend
  • Redirect users to:
    https://app.sellerlegend.com/oauth/authorize
    using your Client ID, secret, and redirect URI.


3️⃣ Approving The Request

  • When the SL application receives these authorization requests, it automatically displays a template to the user allowing them to approve or deny the authorization request.

  • If approved, they’ll be redirected to your application’s redirect URI (must match what you registered).


4️⃣ Converting Authorization Codes To Access Tokens

  • Verify that the returned state parameter matches your original request.

  • Send a POST request to /oauth/token with the authorization code.

  • The request should include the authorization code that was issued by SellerLegend when the user approved the authorization request.

  • Response includes:

    • access_token (expires in ~15 days)

    • refresh_token (expires in ~30 days)

    • expires_in (time in seconds before expiry)

⚠️ The auth code is single-use and expires in 10 minutes.


📚 What to Do Next

  • Explore all available endpoints via the SellerLegend Postman collection.

  • PHP developers can use the official SellerLegend PHP SDK to simplify integration.

  • For examples please follow this Github link
  • For mocked responses please follow this Github link
  • The Official SDK is also installable as a composer package


Was this helpful?

Yes  No

No luck finding what you need? Contact Us

  How Do I Assign Tags to Products?

How to Connect to and Allow Access to your PPC Data  

  • Copyright 2025 SellerLegend Limited. All Rights Reserved.