Authorization
OAuth 2.0 is the industry standard protocol for authorisation. OAuth is an open-standard protocol that allows data sharing between parties with the consent of the user; without the user having to disclose passwords. Our APIs leverage OAuth protocols, using a standardised framework to ensure that using them is simple.
Click here for more information
Authorization Flow
We use OAuth2 JWT flows to secure interactions. Below are CURL, HTTP or C# HttpClient examples for typical CIPC API flows to request, return and use a token, which is required to process queries. The CIPC API is sessionless, so each "session" always begins with the OAuth2 JWT Access Token Flow.
Access Token Flow
This flow shows the steps required to interact with the API
Send an HTTP
POST
request to the tokenUrl:/oauth2/token
Upon a successful authorization grant, the server will respond with an
access_token
Add a new
Authorization
header with typeBearer
and the contents of the aboveaccess_token
Once an access_token has been acquired, it can be used on all queries with an account until it returns a 401. If this occurs, simply request a new token using existing client_id
, refresh_token
and scope
values, and set grant_type
to refresh_token.
Last updated