diff --git a/markdownpages/profit/en/authentication.md b/markdownpages/profit/en/authentication.md index 4fc56f3..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 --- @@ -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..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 --- @@ -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:**