Limio
WebsiteHelp Desk
  • Home
  • Custom Components
    • Getting Started with Custom Components
    • Connecting External CI
    • Development Guidelines
    • Prop Types
    • Custom subcomponents
    • Connecting to External Service
  • Limio SDK
    • Getting Started with Limio SDK
    • Basket (Cart), Promo Code
    • Page, Offer, and Add-On
    • User, Subscription, Invoice & Address
    • Advanced Methods
      • Express Checkout
      • Core Utilities and Helpers
  • API Docs
    • Authentication Schemes
      • OAuth Bearer Token
      • API Key (Catalog API-only)
    • Catalog API
    • Promo Codes API
    • Order API
    • Objects API
    • Shop Build & Publish API
    • External Identities API
  • Webhooks
    • Using Webhooks
    • Webhooks Overview
  • I want to...
    • Retrieve abandoned baskets
    • Enable self-service on a CPQ order
Powered by GitBook
On this page
  • Using the Client Credentials Method to Authenticate with Limio's APIs
  • Prerequisite
  • How to get your Bearer Token

Was this helpful?

  1. API Docs
  2. Authentication Schemes

OAuth Bearer Token

The OAuth Bearer Token provides full read/write access to most Limio APIs. Those APIs can be used for posting Orders, adding Identities, retrieving Abandoned Baskets, and more.

PreviousAuthentication SchemesNextAPI Key (Catalog API-only)

Last updated 3 months ago

Was this helpful?

Using the Client Credentials Method to Authenticate with Limio's APIs

The client credentials method for generating an OAuth Bearer Token allows secure, server-to-server authentication without user involvement. It enables interaction with most of Limio's APIs, including the Order API, Subscription API, Abandoned Basket API, and External Identities API. This is typically the method you will use to get started.

Prerequisite

To access Limio's API via the OAuth Bearer Token, you will first need your client_id and client_secret. To obtain these credentials, please contact Limio Support via .

How to get your Bearer Token

Endpoint: To create your Bearer Token, you need to send a request to the following endpoint:

POST {{tenant}}/oauth2/token
  • Where {{tenant}} is your Limio application URL such as (US hosting) or (EU hosting)

Headers: You will need to include the following headers in your request:

Header

Value

Content-Type

'application/x-www-form-urlencoded'

Request body: You will need to include the following payload in your request:

Form Parameters

Value

grant_type

client_credentials

client_id

The client_id you received from Limio Support.

client_secret

The client_secret you received from Limio Support.

Example: For example, to request a Bearer token, you can send a request using cURL:

 curl --request POST \
  --url https://{tenant}/oauth2/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id={client_id_details} \
  --data client_secret={client_secret_details}

Response: This will return the following response:

HTTP/1.1 200 OK 
Content-Type: application/json

{ 
    "access_token":"<Bearer <YOUR_TOKEN_HERE>",
    "token_type":"Bearer", 
    "expires_in":3600 
}

Next steps: Place your Access Token ("<Bearer <YOUR_TOKEN_HERE>") to use in the authorisation header of all API calls set to the BearerAuth. For example, to call the Order Api, you'd use:

const basePath = 'api';
const domain = 'prod.limio.com' or 'prod-us.limio.com';
const shard = 'tenant';
const resp = await fetch(
  `https://${shard}.${domain}/${basePath}/order`,
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer <YOUR_TOKEN_HERE>'
    }...
this link
https://{{tenant}}.prod-us.limio.com
https://{{tenant}}.prod.limio.com