API Integration

This guide will show you how to obtain an API token within the GoodAccess Control Panel for accessing the API and performing authorized operations.

circle-info

This feature is available in the Premium plan and higher.

For more detailed API integration documentation, we recommend visiting the Postman Documentationarrow-up-right or downloading the collection and importing it into Postman.

Obtaining API token

Log in to the GoodAccess Control Panel, and go to Settings > API Integration.arrow-up-right

Here, add a new integration or edit an existing one.

Select scopes of the integration, set expiration and allowed IP addresses, and generate a token.

Additionally, you can monitor the activity and communication of the integration from this interface.

API Integration detail.
API Integration detail
triangle-exclamation

Your token can be used to authorize HTTP requests to the GoodAccess API. Each request must include an Authorization header with the token written as Bearer <token>.

See the examples at the bottom of the page for correct syntax.

circle-info

Treat your token like a password and store it securely. For example, use the methods env and dotenv to store it in a development environment.

Testing connection to GoodAccess API

To test your API connection, send an authenticated request to the test-connection endpoint. If the connection is successful, you will get a 200 return code.

Test Connection

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
chevron-right
200

OK

application/json
Responseobject
get
/api/v1/test-connection
200

OK

Below are examples of how to call the test endpoint in various languages.

Last updated

Was this helpful?