Authentication API Documentation

Endpoint

POST <https://api.buildnow.sa/v2/o/token/>


Description

The Authentication API allows partners to obtain an access token via client credentials. This token is required to authenticate and interact with other BuildNow APIs (such as: Purchase Order). The token includes information about the partner, such as scope, allowed origins, and expiration.


Request Format

Headers

Header Name Value
Content-Type application/x-www-form-urlencoded

Request Body

The request body must be sent in application/x-www-form-urlencoded format and include the following fields:

Field Type Required Description
grant_type String Yes Must be set to client_credentials.
client_id String Yes The client ID provided by BuildNow.
client_secret String Yes The client secret provided by BuildNow.

Example Request

cURL Command

curl --location '**<https://api.buildnow.sa/v2/o/token/**>' \\
--header 'Content-Type: application/x-www-form-urlencoded' \\
--data-urlencode 'grant_type=client_credentials' \\
--data-urlencode 'client_id=W6LAJjBfWJDf1pRGZsVO4Ijw2Qc' \\
--data-urlencode 'client_secret=jEcabt6jFnkTYTSXEolyA54bQfAHctjZRG0MeEIHYUmY9AL'

Response