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.

This feature is available in the Premium plan and higher.

For more detailed API integration documentation, we recommend visiting the Postman Documentation 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.

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

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.

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
Responses
200
OK
application/json
Responseobject
get
GET /api/v1/test-connection HTTP/1.1
Host: integration.goodaccess.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "message": "Connection has been established successfully."
}

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

curl -i https://integration.goodaccess.com/api/v1/test-connection \
  -H "Authorization: Bearer <integration_token>"

Last updated

Was this helpful?