Summary of OAuth2 Authorization Flow
By following the OAuth2 authorization flow, your application can securely obtain access tokens from AIRisk API. This design ensures that users can grant, or revoke access as needed and that your app never needs to handle raw passwords. It also allows AIRisk to scope the issued tokens to specific users or to your application overall, depending on the presence of the userid
parameter.
Furthermore, it allows AIRisk admins to define sets of credentials and allowed redirect uris (corresponding to
APIUser
instances), and then share the client id, secret, and the redirect uris as well as set them accordingly. These are all one needs to be able to get a generic token via the authentication process.Moreover, the admins also have control over the
ApplicationUser
instances (each with a uniqueuserid
, corresponding with an actual user of the platform), the agents they can access, particular chat-related settings, as well as theirCompany
to which they belong to further scope their permissions.
For more information on OAuth2 and best practices, you may refer to external resources like the official OAuth 2.0 framework specification RFC 6749 for in-depth details, or approachable guides such as OAuth 2 Simplified and the DigitalOcean tutorial "An Introduction to OAuth 2" for a conceptual overview. Using this information to properly authenticate and acquire tokens, you may now explore the AIRisk API endpoints with authenticated requests, knowing that the OAuth2 standard is handling the authorization securely under the hood. Happy building!
Last updated