Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

External client API access management

Krzysztof Kaczmarczyk edited this page Mar 1, 2021 · 2 revisions

Creating external client credentials

Creating credentials for external clients allows them to access externally available endpoints. A list of available API endpoints can be found here (endpoints with 'external-access' tag):

https://benetechservicenet.org/#/api-documentation

The client will only be able to see Organization records from his System Account.

In order to create a client:

  1. go to the 'Client management' admin screen,
  2. specify client ID and secret,
  3. specify token validity (an hour by default),
  4. select the System Account.

Client authentication:

The client can then authenticate himself by issuing a POST request to /oauth/token endpoint like so: http(s)://clientName:secret@host:port/services/servicenetauth/oauth/token?grant_type=client_credentials&scope=external

This request will return the token in the response body.

The acquired token can be used to access the API by adding a request cookie header:

Cookie: access_token="your_token"