Skip to main content

Newbridge API authentication guide

API uses a secure authentication process based on an API key and secret.

Xanthe Jackson avatar
Written by Xanthe Jackson
Updated over 2 months ago

Newbridge uses an API key and secret to create a token, which is then valid for 30 minutes.

Secret keys are created per company, and you can request the activation of the API on your account from a support representative. They will then provide you with the key and secret required.


Before you begin

Before you begin, ensure you have:

  • Requested API activation from a Newbridge support representative.

  • Received your company-specific API Key and Secret.


Authentication steps

Request

Headers

POST REQUEST (/api/app/auth)  Header: Content-Type - application/json Header: Accepts - application/json

Body

Submit the Key and Secret to the Auth endpoint, as shown below:

{     "key":"XXXXXXXXXX",     "secret": "XXXX-XXXXX-XXXXX" }

Response

You will then receive a response with a token, valid for 30 minutes that you can use to authenticate future requests.

The response contains a key and expiry date/time for the key, as shown below:

{     "token": "xxxxxxxxxxxxxxxxxxxxxxxx",     "expires": "2021-02-09 19:40:12" }

Curl Example

 curl --location --request POST 'https://console.newbridgesoftware.co.uk/api/app/auth' \ --header 'Content-Type: application/json' \ --data-raw '{     "key": "XXXXXXXX",     "secret": "XXXX-XXXX-XXXX-XXXX" }'


Best practices

  • Keep your API Key and Secret secure.

  • Refresh your token every 30 minutes or before expiry.

  • Do not share credentials publicly.


Troubleshooting and common errors

  • 400 Bad Request – The request format is invalid (e.g., missing required fields).

  • 401 Unauthorised – Invalid or missing authentication credentials.

  • 403 Forbidden – Credentials are valid, but you lack permission for the resource.

  • 404 Not Found – The requested endpoint does not exist.

  • 429 Too Many Requests – Rate limit exceeded; wait before retrying.

  • 500 Internal Server Error – Server encountered an unexpected issue.


Did this answer your question?