Complyt Docs
  1. Authentication
Complyt Docs
  • Getting Started
    • Introduction to Sales Tax Calculation
    • Step By Step - Creating your first transaction
    • Step By Step - Creating VAT / Global Tax Transaction
  • Endpoints
    • Authentication
      • Authentication - Getting Started
      • Create JWT
        POST
      • Create JWT - Partnerships
        GET
      • Get Partnerships
        GET
      • Upsert Client- Partnerships
        POST
      • Delete Client- Partnerships
        DELETE
    • Customers
      • Get to Know
      • Get Customer
      • Get All Customers
      • Upsert Customer
      • Update Customer
    • Exemptions
      • Get to Know
      • Get All Exemptions
      • Post Exemption
      • Update Exemption
      • Patch Exemption
    • Transactions
      • Get to Know
      • The Importance of Shipping Address
      • How to Use Credit Memos
      • Get Transaction (thin)
      • Get Transaction
      • Upsert Transaction
      • Delete Transaction
      • Get All Transactions (thin)
      • Get All Transactions
      • Upsert VAT / GT Transactio
    • Files
      • Get All Files
      • Get One file - With signed link
      • Save file
      • Delete one file
    • Address Validation
      • Address Validation Intro
      • Validate Address
    • Sales Tax Rates
      • Get Sales Tax Rates
    • Vat Validation
      • Validate Vat
  • Special Features
    • Global Tax Rate
    • Partial Address
    • Discounts
    • Inclusive Tax
    • Vat Validation
    • Post exemptions from CSV
      POST
  1. Authentication

Authentication - Getting Started

Sequence Diagram

Request#

Use Complyt API to obtain Auth0 bearer token. To do this, you’ll need to send a POST request to complyt token endpoint, passing your client ID and client secret in the request body. Here’s an example cURL command to do this:
curl --request POST \
  --url 'https://demo.complyt.io/v1/token' \
  --header 'content-type: application/json' \
  --data '{
    "clientId": "A414......................GsFf87t",
    "clientSecret": "HHCv..............gQ491nSVed35"
}'
Replace the placeholders with your actual client ID and client secret.

Response#

If the request is successful, you’ll receive a JSON response that includes an access token. The access token is your bearer token, which you can use to authenticate requests to your M2M application’s API. Here’s an example response:
{
   "accessToken":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
   "tokenType":"Bearer",
   "expiresIn":86400
}
CHECK
That’s it! You can now use the access token as a bearer token to authenticate requests to your M2M application’s API. Please note that the token expires in 24 hours, so either re-generate it with every request or re-generate it daily.
The token expires in 86400 seconds (24 hours), consider either:
Re-generating the token with each request
Implementing a mechanism to refresh the token daily
Modified at 2024-09-17 09:49:37
Previous
Step By Step - Creating VAT / Global Tax Transaction
Next
Create JWT
Built with