Skip to main content

OAuth2 Connection - Beta

This article describes how to use an OAuth2 connection to authenticate your API calls.

M
Written by Mustapha Bettich
Updated today

In order to use an OAuth2 connection, you need to create an App. This will allow you to:

  • Declare a specific scope of APIs

  • Restrict access to only users who have access to the App

Creating the App

  1. Go to the Developer space — you will land on the Apps tab, which displays a button to create one.

  2. Open the view to create an App.

  3. Fill in:

    1. Name

    2. Title

    3. App code

  4. Save

Enabling OAuth2

  1. Go to the Security tab on the App's page

  2. Enable OAuth2 in the dedicated section

  3. Add at least one redirect URL

  4. Save

  5. Note down the following:

    1. Authorization URL

    2. Access Token URL

    3. Client ID

    4. Client Secret

Scope Rights and Restrictions

You can now choose the scopes (endpoints) open within this OAuth2 authentication via the Authorized APIs field.

Before starting the OAuth2 flow, install the App and grant access rights to this App for the identified users via the rights management interface (Apps section).

Starting the OAuth2 Flow

From an OAuth client, you can start the OAuth2 flow:

  1. Authorize → Redirects to Boond to obtain an authorization_code

  2. Callback → Receives the code and exchanges it for an access_token

  3. Test API Call → Test an API call with the token

Here's a curl example

curl -H "Authorization: Bearer <access_token>" \                                                                                                                                                                                       
-H "Accept: application/json" \
https://ui.boondmanager.com/api/application/current-user

Did this answer your question?