Brick API Documentation
QR Code SNAP

Get Access Token (SNAP)

Use this endpoint only for QR Code SNAP APIs. It generates a SNAP B2B bearer token for requests that also require SNAP headers such as X-CLIENT-KEY, X-TIMESTAMP, and X-SIGNATURE.

For general Brick APIs that use publicAccessToken, use Generate Public Access Token instead.

Request Parameters

Key ParametersData TypeDescription
Content-TypeStringString representing the content type (application/json)
X-CLIENT-KEYStringClient's client_id
X-TIMESTAMPdatetimeClient's current local time in yyyy-MM- ddTHH:mm.SSSTZD format
X-SIGNATUREstringNon-repudiation & integrity validation checking.

Generated by client and created using asymmetric
signature SHA256withRSA algorithm
(Private_Key, stringToSign)
stringToSign = client ID + “|” + X-TIMESTAMP
grant_typestringMust be client_credentials

Response Parameters

Key parametersData typeDescription
responseCodeintegerA code indicating the success or failure of the request, along with the associated reason.
responseMessagestringA detailed message providing further context on the response code.
accessTokenstringAn authorization token issued to the client for accessing protected resources.
tokenTypestringSpecifies the type of token returned (e.g., Bearer).
expiresInintegerThe duration (in seconds) for which the access token is valid before expiring. It will be 900 seconds in default.
Last modified on