To access GOPACS APIs, your application must authenticate using OAuth2 Client Credentials. This guide explains how to create client credentials and obtain an OAuth2 Bearer Token that can be used to call GOPACS APIs.
The process consists of two steps:
Register your API client in GOPACS and obtain a Client ID and Client Secret.
Use these credentials to request a Bearer Token from the authorization server.
The sections below explain each step in detail. For a video instruction (in Dutch), please check this explanation video.
General information about OAuth2 can be found here.
The steps in the instruction manual are described in table form to clearly define the steps. The following columns are defined.
Column | Definition |
|---|---|
Step | Order in which the steps are needed to be executed. |
Description | Describes in detail what happens in the step. |
Is a term unclear? You’ll likely find its definition in our Glossary.
The English the glossary is located here: Glossary - GOPACS
De Nederlandse begrippenlijst vind je hier: Begrippenlijst - GOPACS
More manuals can be found here: Manuals
If you need help or have questions, you can find our details here: Contact
You only need to set up the client credentials once for the application that uses one of the GOPACS APIs.
Step | Description |
|---|---|
1 | Log in to the GOPACS UI (app.gopacs.eu) in your role as a Grid Admin or Trading Company Admin. |
2 | Navigate to ‘Organisations > API Clients’. ![]() |
3 | Click ‘+ Add’ to create a new API client. |
4 | Enter a unique name and select the roles you want to assign to the API client. |
5 | After creating the API client, you will see a client key. For security reasons, this key is only shown once! |
Step | Description | ||||||
|---|---|---|---|---|---|---|---|
1 | To obtain an access token, authenticate with the OAuth2 authorization server using the Client ID and Client Secret obtained in Step 1. The authorization server URL is listed in the table below.
This endpoint expects a POST request with the application/x-www-form-urlencoded content type and returns a JSON response. curl -X POST "https://auth.acc.gopacs-services.eu/realms/gopacs/protocol/openid-connect/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "client_id=xxxxxx" \ -d "client_secret=xxxxxxxx" \ -d "grant_type=client_credentials" | ||||||
2 | In the response you’ll find an access token. This token can be used as authentication for the service. {
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSl...",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSl...",
"token_type": "bearer",
"not-before-policy": 0,
"session_state": "a856fb91-eabc-460e-a54b-808c93acdc29"
}
| ||||||
3 | Now, you need to read the access_token from this object and add it to the Authorization header of any subsequent request to any GOPACS API. Authorization: Bearer <token> Accept: application/json | ||||||
4 | From that moment on, your application uses this Bearer Token to authenticate with all GOPACS APIs for which the API client is authorized. |