API Applications
The applications tab is where you define specific applications for use with the API. Your PBX uses Oauth2.0 for all Applications. It is suggested that you read more about how to use Oauth2.0 in your applications here:
https://alexbilbie.com/guide-to-oauth-2-grants/
https://oauth.net/getting-started/
Add Application
To add an application click "Add Application". You will be presented with four options
Web-server app
The 'Web-server App', also known as 'Authorization Code Grant', should be very familiar if you’ve ever signed into a web app using your Facebook or Google account
Browser-based/Single Page app
The 'Browser-based/Single Page app', also known as 'Implicit Code Grant', is similar to the 'Web-server App' with two distinct differences
It is intended to be used for user-agent-based clients (e.g. single page web apps) that can’t keep a client secret because all of the application code and storage is easily accessible
Secondly instead of the authorization server returning an authorization code which is exchanged for an access token, the authorization server returns an access token
Native App
The 'Native app', also known as 'Resource owner password credentials grant', is a great user experience for trusted first party clients both on the web and in native applications
Machine-to-Machine App
The 'Machine-to-Machine app', also known as 'Client credentials grant', is suitable for machine-to-machine authentication, for example for use in a cron job which is performing maintenance tasks over an API. Another example would be a client making requests to an API that don’t require user’s permission
Once you add an Application you will be presented with a list of information to utilize in your application
For example. We can utilize the above data and insert it into insomina to get our GraphQL Scheme and start making calls.
Go to the Oauth2.0 tab in Insomnia and fill in the data. Make sure to expand Advanced Options and declare a scope (See API Scope Visualizer for more information on scopes) otherwise you won't be able to do anything but authenticate.
Then click "Fetch Tokens".
Now go back to the GraphQL Tab and fetch the schema
You can now execute GraphQL Queries from within Insomnia
API URL List
To view usable API URLs for your PBX click API URL List
OAuth 2.0 URLs
Authorize
Token
Resource
GraphQL URLs
This is the URL you will use to post data against for GraphQL Queries
RESTful URLs
This is the base URL you will use to REST against for REST queries