
Open API Access
User Consent
In the context of integrating with open APIs, it is crucial to understand that obtaining an access token, which includes user consent, is a fundamental requirement. This process ensures that all interactions with the API are secure and authorized by the user. It’s important to note that the workflow for integrating these APIs into a web environment is slightly different compared to mobile integration. This document will provide a clear guide on how to effectively implement the workflow for web integration while adhering to the necessary security protocols and user consent guidelines.
Workflow Overview
Initiate OAuth Flow
The Host app initiates the OAuth flow by redirecting the user to Quicko OAuth with a properly constructed URL including an options object that is base64 encoded.
Exchange Request Token
Upon successful consent, Quicko redirects back to the Host app with a
request_token. The Host app exchanges this token for an access token.Step-by-Step Integration
1. Redirect to Quicko OAuth
Construct a redirect URL to Quicko’s OAuth endpoint. Include yourapi_key and the redirect (the URL to which Quicko will send the user after authorization) and an options query parameter, which is a base64-encoded JSON object containing user details and theme preferences.
Options Object
Here is the JSON structure of the options object:Encoding
Encode this JSON object in base64 and append it as a query parameter to the OAuth URL.
affiliate_id query parameter.
Sample URL:
2. User Consent
When the user is redirected to Quicko’s OAuth endpoint, they will be presented with the consent screen. Upon granting consent, Quicko will redirect the user back to yourredirect.
3. Handle the Redirect
Upon user consent, Quicko redirects the user to yourredirect with a request_token. If the user denies consent, they will be redirected back with a query parameter status set to cancelled.
For example, if the host’s redirect is host-app.com/incoming, the user will be redirected to:
Consent Denied
Consent Acquired
Handling Denial of Consent
User Denies Consent
If a user denies consent, handle the redirection with the
status parameter appropriately in your application flow, typically by presenting an appropriate message to the user or offering the option to retry the authorization process.4. Exchange Request Token
Your server should exchange therequest_token for an access token by making a server-side request to Quicko’s token exchange endpoint. Store this access token securely on your server for subsequent requests to Quicko’s APIs.
OAuth Authorize API
You can use the OAuth Authorize API for this exchange.
5. Redirect to Income Tax Web App
With the access token, query the user’s data as needed. Then, to continue their tax journey, redirect the user to Quicko’s Income Tax Web App. URL:https://it.quicko.com
Recommendations
Secure Storage
Secure Storage
Always ensure the
access_token is stored securely on your server. Never expose it in client-side code or public repositories.Event Handling
Event Handling
Regularly listen to event postbacks from Quicko’s services to keep track of the user’s journey and take appropriate actions.