From 6b8a649107dc17e1823282a6d21a7bc49fb59551 Mon Sep 17 00:00:00 2001 From: Tom Klute Date: Thu, 10 Sep 2026 11:32:06 +0200 Subject: [PATCH 1/5] Update OAuth Authorization Code Flow documentation to correct parameter order and add refresh token retrieval steps --- markdownpages/profit/en/authentication.md | 18 ++++++++++++------ markdownpages/profit/nl/authentication.md | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/markdownpages/profit/en/authentication.md b/markdownpages/profit/en/authentication.md index 4fc56f3..8edd4d5 100644 --- a/markdownpages/profit/en/authentication.md +++ b/markdownpages/profit/en/authentication.md @@ -153,10 +153,9 @@ To access the API via the Authorization Code Flow, follow these steps: 1. response_type: code 2. client_id: `` 3. redirect_uri: `` - 4. scope: `` - 5. state: `` - 6. code_challenge: `` - 7. code_challenge_method: `` + 4. state: `` + 5. code_challenge: `` + 6. code_challenge_method: `` 2. The user logs in and grants permission. After granting permission the user is redirected back to the provided redirect_uri with an authorization code. 2. Exchange the authorization code for an access token 1. Call the [token endpoint](#token-endpoint) (POST) with the following information in the body: @@ -171,15 +170,22 @@ To access the API via the Authorization Code Flow, follow these steps: 2. refresh_token: a token that can be used to obtain a new access token. 3. token_type: Bearer 4. expires_in: validity of the access token in seconds. -3. Use the access token +4. Use the access token 1. Copy the access token, prefix it with 'Bearer', and add it to your Authorization header. +5. Obtain a new access token using the refresh token + 1. Call the [token endpoint](#token-endpoint) (POST) with the following information in the body: + 1. grant_type: refresh_token + 2. refresh_token: `` + 3. client_id: `` + 4. client_secret: `` + 2. In the response of this call you will find the same fields as in step 3. #### cURL examples **Step 1: Redirect user to authorization endpoint:** ```bash # Open this URL in a browser: -https://.rest.afas.online/ProfitRestServices/oauth/authorize?response_type=code&client_id=&redirect_uri=&scope=&state=&code_challenge=&code_challenge_method=S256 +https://.rest.afas.online/ProfitRestServices/oauth/authorize?response_type=code&client_id=&redirect_uri=&state=&code_challenge=&code_challenge_method=S256 ``` **Step 2: Retrieve token with authorization code:** diff --git a/markdownpages/profit/nl/authentication.md b/markdownpages/profit/nl/authentication.md index e6f1498..9280ab9 100644 --- a/markdownpages/profit/nl/authentication.md +++ b/markdownpages/profit/nl/authentication.md @@ -152,10 +152,9 @@ Om toegang te krijgen tot de API via de Authorization Code Flow, volg je de volg 1. response_type: code 2. client_id: `` 3. redirect_uri: `` - 4. scope: `` - 5. state: `` - 6. code_challenge: `` - 7. code_challenge_method: `` + 4. state: `` + 5. code_challenge: `` + 6. code_challenge_method: `` 2. De gebruiker logt in en geeft toestemming. Na toestemming wordt de gebruiker teruggeleid naar de opgegeven redirect_uri met een autorisatiecode. 2. Wissel de Autorisatiecode in voor een Access Token 1. Roep het [token endpoint](#token-endpoint) (POST) aan met de volgende informatie in de body: @@ -170,15 +169,22 @@ Om toegang te krijgen tot de API via de Authorization Code Flow, volg je de volg 2. refresh_token: een token dat kan worden gebruikt om een nieuw access token te verkrijgen. 3. token_type: Bearer 4. expires_in: geldigheid van het access token in seconden. -3. Access Token Gebruiken +4. Access Token gebruiken 1. Kopieer de access token, zet er 'Bearer' voor, en voeg hem toe in je Authorization header. +5. Een nieuw access token en refresh token ophalen + 1. Roep het [token endpoint](#token-endpoint) (POST) aan met de volgende informatie in de body: + 1. grant_type: refresh_token + 2. refresh_token: `` + 3. client_id: `` + 4. client_secret: `` + 2. In de response van deze aanroep vind je dezelfde velden als bij stap 3. #### cURL voorbeelden **Stap 1: Gebruiker redirecten naar autorisatie endpoint:** ```bash # Open deze URL in een browser: -https://.rest.afas.online/ProfitRestServices/oauth/authorize?response_type=code&client_id=&redirect_uri=&scope=&state=&code_challenge=&code_challenge_method=S256 +https://.rest.afas.online/ProfitRestServices/oauth/authorize?response_type=code&client_id=&redirect_uri=&state=&code_challenge=&code_challenge_method=S256 ``` **Stap 2: Token ophalen met autorisatiecode:** From a012118011fd3e3a6604e4a3b512fa1414108cd3 Mon Sep 17 00:00:00 2001 From: Tom Klute Date: Thu, 10 Sep 2026 11:35:30 +0200 Subject: [PATCH 2/5] Datum update --- markdownpages/profit/en/authentication.md | 2 +- markdownpages/profit/nl/authentication.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/markdownpages/profit/en/authentication.md b/markdownpages/profit/en/authentication.md index 8edd4d5..ef6cb12 100644 --- a/markdownpages/profit/en/authentication.md +++ b/markdownpages/profit/en/authentication.md @@ -1,6 +1,6 @@ --- author: CLN -date: 2026-08-26 +date: 2026-09-10 tags: GetConnector, AppConnector, Integration, Configuration, Authentication, Authorization title: Authentication --- diff --git a/markdownpages/profit/nl/authentication.md b/markdownpages/profit/nl/authentication.md index 9280ab9..626b3e5 100644 --- a/markdownpages/profit/nl/authentication.md +++ b/markdownpages/profit/nl/authentication.md @@ -1,6 +1,6 @@ --- author: CLN -date: 2026-08-26 +date: 2026-09-10 tags: GetConnector, AppConnector, Integration, Configuration, Authentication, Authorization title: Authenticatie --- From 410b3d26f64a71be602b43ef14bd833f8b363de3 Mon Sep 17 00:00:00 2001 From: Heimmot24 Date: Thu, 10 Sep 2026 11:37:06 +0200 Subject: [PATCH 3/5] Fix formatting and add expires_in field in authentication.md Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- markdownpages/profit/en/authentication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdownpages/profit/en/authentication.md b/markdownpages/profit/en/authentication.md index ef6cb12..aefd0ba 100644 --- a/markdownpages/profit/en/authentication.md +++ b/markdownpages/profit/en/authentication.md @@ -168,7 +168,7 @@ To access the API via the Authorization Code Flow, follow these steps: 3. In the response of this call you will find the following fields: 1. access_token: the access token you must add to the Authorization header. 2. refresh_token: a token that can be used to obtain a new access token. - 3. token_type: Bearer + 3. token_type: Bearer
4. expires_in: validity of the access token in seconds. 4. expires_in: validity of the access token in seconds. 4. Use the access token 1. Copy the access token, prefix it with 'Bearer', and add it to your Authorization header. From 7bc7e4fe8af6fb7df15bcebd6da08b798237866d Mon Sep 17 00:00:00 2001 From: Heimmot24 Date: Thu, 10 Sep 2026 11:37:28 +0200 Subject: [PATCH 4/5] Fix formatting for token_type and expires_in fields Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- markdownpages/profit/nl/authentication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdownpages/profit/nl/authentication.md b/markdownpages/profit/nl/authentication.md index 626b3e5..26d8cc9 100644 --- a/markdownpages/profit/nl/authentication.md +++ b/markdownpages/profit/nl/authentication.md @@ -167,7 +167,7 @@ Om toegang te krijgen tot de API via de Authorization Code Flow, volg je de volg 3. In de response van deze aanroep vind je de volgende velden: 1. access_token: de access token die je in de Authorization header moet toevoegen. 2. refresh_token: een token dat kan worden gebruikt om een nieuw access token te verkrijgen. - 3. token_type: Bearer + 3. token_type: Bearer
4. expires_in: geldigheid van het access token in seconden. 4. expires_in: geldigheid van het access token in seconden. 4. Access Token gebruiken 1. Kopieer de access token, zet er 'Bearer' voor, en voeg hem toe in je Authorization header. From 1e386eb3c21f8d91986961a2ba715b60c3592aeb Mon Sep 17 00:00:00 2001 From: Tom Klute Date: Thu, 10 Sep 2026 11:42:24 +0200 Subject: [PATCH 5/5] Fix formatting for token_type field in OAuth documentation --- markdownpages/profit/en/authentication.md | 2 +- markdownpages/profit/nl/authentication.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/markdownpages/profit/en/authentication.md b/markdownpages/profit/en/authentication.md index aefd0ba..ef6cb12 100644 --- a/markdownpages/profit/en/authentication.md +++ b/markdownpages/profit/en/authentication.md @@ -168,7 +168,7 @@ To access the API via the Authorization Code Flow, follow these steps: 3. In the response of this call you will find the following fields: 1. access_token: the access token you must add to the Authorization header. 2. refresh_token: a token that can be used to obtain a new access token. - 3. token_type: Bearer
4. expires_in: validity of the access token in seconds. + 3. token_type: Bearer 4. expires_in: validity of the access token in seconds. 4. Use the access token 1. Copy the access token, prefix it with 'Bearer', and add it to your Authorization header. diff --git a/markdownpages/profit/nl/authentication.md b/markdownpages/profit/nl/authentication.md index 26d8cc9..626b3e5 100644 --- a/markdownpages/profit/nl/authentication.md +++ b/markdownpages/profit/nl/authentication.md @@ -167,7 +167,7 @@ Om toegang te krijgen tot de API via de Authorization Code Flow, volg je de volg 3. In de response van deze aanroep vind je de volgende velden: 1. access_token: de access token die je in de Authorization header moet toevoegen. 2. refresh_token: een token dat kan worden gebruikt om een nieuw access token te verkrijgen. - 3. token_type: Bearer
4. expires_in: geldigheid van het access token in seconden. + 3. token_type: Bearer 4. expires_in: geldigheid van het access token in seconden. 4. Access Token gebruiken 1. Kopieer de access token, zet er 'Bearer' voor, en voeg hem toe in je Authorization header.