Skip to content

Generate Token

POST https://api.staging.sawfish.com.au/api/v2/accounting/token/generate-token

This generates an access token that is valid for 10 minutes. This endpoint should be called only once. After obtaining the refresh_token, use the Refresh Token endpoint to get a new access token.

Header Type Required
x-client-id string
x-api-key string
Terminal window
curl --request POST \
--url https://api.staging.sawfish.com.au/api/v2/accounting/token/generate-token \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-client-id: your-client-id' \
--header 'x-api-key: your-api-key'

200 - Successful response

{
"status": "SUCCESS",
"data": {
"token": "your_token",
"refresh_token": "your_refresh_token",
"expiration": 1691123100
}
}

401 Unauthorized / 500 Internal Server Error

{
"status": "ERROR",
"message": "Sample error message"
}