Connecting your APIs with OAuth2 - Knowledgebase / Platform's APIs access - Support NetExplorer Skip to main content

Connecting your APIs with OAuth2 - Knowledgebase / Platform's APIs access - Support NetExplorer

Connecting your APIs with OAuth2

When connecting to the NetExplorer APIs, you now have to use OAuth2 authentication. This article shows you how to configure it.

 

The way in which your applications can connect to the NetExplorer APIs by retrieving a user's credentials is changing. Indeed, if you have subscribed to the possibility, your platform wil give you the way to create an application enabling OAuth2 connection.

 

On your plaform

As an administrator, when you connect on your browser, go to the menu  at the bottom left of the screen Once you are on this menu, choose the tab at the end of the central page, then simply click on 

 

Creating your OAuth2 application

When clickiig on creation button, the window below will appear

  1. You can assign a logo to your authentication application by clicking on
  2. Give your OAuth2 application a name
  3. Add a description of your application use
  4. The name of the application's publisher or creator 
  5. The publisher's or creator's site
  6. Any callback urls to be implemented during a client connection
  7. By clicking on this button, you will select the rights scopes assigned to your application
  8. The type of application you are going to use
    • Client: use an existing profile account on the platform (for example, to access items to which the user has rights)
    • Server: create an application allowing administrator access (for example, for global access scripts, etc.).

 

Selecting scopes

When clicking on button (point 7 in the above list) you'll get a window allowing you to give the necessary rights for your application

Depending on your requirements, you can grant the various calls listed in the scopes (account, annotations, files...) the rights the applications must have, as soon as an API call is made:

  1. Read
  2. Write
  3. All rights (read and write)

The button allow you to give global rights to all calls.

Once you have filled in the required fields, click save.

Your application has been created, a window showing 2 parameters required for your connection will appear:

  • client_id: you'll be able to find this parameter within your application, if necessary.
  • client_secret: remember to copy this parameter, as you will not be able to access it afterwards.

 

Connecting your application, example with Postman

Once the elements have been configured, you can call the authentication API within your script or code elements.

Here we're going to take a simple look at how to call your authentication via Postman. As shown in the API documentation, I'm going to go here: https://api.netexplorer.fr/v3/#authorize the 3 necessary parameters:

  • client_id
  • grant_type
  • client_secret

The purpose there is to get the connexion token of OAuth2 application, in server mode.

The answer is automatically generated in JSON, including the acces_token