get
https://sandbox.onebrick.io/v2/payments/auth/token
This endpoint allows developers to retrieve a short-lived public access token (JWT) necessary for initiating certain operations within the Brick system. The token is valid for 5 minutes and is intended for single-use only.
Request Parameters
| Key Parameters | Data Type | Description |
|---|---|---|
| username | String | Your Client ID (You can collect this from Brick dashboard) |
| password | String | Your Client Secret (You can collect this from Brick dashboard) |
Response Parameters
| Key Parameters | Data Type | Description |
|---|---|---|
| message | String | Contain info that access token is valid for 5 minutes and can use one time only. |
| accessToken | String | This is unique token for clients, also called as public access token, It should be use this token for further APIs. |
| issuedAt | String | Token generation time. |
| expiresAt | String | Expiry of token, expiry for token is 5 minutes and can only be used 1 time. |
Response Code
We use the following HTTP status code in the response depending on the success or failure:
| Response Code | Description |
|---|---|
| 200 | The content was fetched successfully in the response |
| 400 | Request returned an error |
| 401 | Brick credentials are not valid |
| 404 | Requested resource not found |
| 500 | Internal Server Error |
