cURL Example to Generate an Access Token

Modified on Thu, 14 Sep, 2023 at 2:51 PM

Here's an example which makes a HTTP POST request to generate an access token for supply queries

curl --location --request POST '' \
--header 'User-Agent: <your Nexar Client>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw 'grant_type=client_credentials&client_id=<your Client Id>&client_secret=<your Client Secret>&scope=supply.domain'

Warning : For performance reasons and to reduce the pressure on our identity service, please cache the access token (valid by default for up to 24 hours) rather than generate a new token for every query.

Be sure to replace the <your client> fields with your client information.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article