Setting up an API Client (M2M)
Last updated
Last updated
The video above is not yet taking into account the new "rules" concept; please be mindful that scopes are now to be configured using rules as instructed below. We'll update it soon.
In this section you will learn how to setup an API Client for machine-to-machine communication. Let's assume you want to build your own Quasr Tenant Administration to manage users, clients, factors, etc., or need to connect your own tools such as your CRM software, Unified Communications System, or alike with Quasr.
It is also used when you want to configure your Quasr tenant automatically as part of your DevOps process.
So let's get started:
After the client settings are saved, you will see a dialog showing the client secret and a sample cURL command to retrieve an access token for this client. Note that you only see the client secret in the clear once and never again. Make sure to note it down securely, otherwise you would need to re-create it if you forget it.
Copy & paste the cURL command into a terminal. Note the empty scope parameter; if you execute the command it will fail as an empty string is not allowed. We must first configure allowed scopes for the client through rules.
Once the client is created, go the details by clicking the edit icon, and go the Rules tab. Click New Rule and select the 'Admin Access' control.
Once completed you can now execute the previous command but make sure to add the desired scope name instead of the empty string, in this case https://api.quasr.io/scopes/admin
.
This is where machine clients come into play, which we also consider an "account". These machine clients will need an Access Token with a specific scope https://api.quasr.io/scopes/admin
in order to communicate with the .