api-client


License

License

The MIT License
Categories

Categories

CLI User Interface
GroupId

GroupId

com.quicko
ArtifactId

ArtifactId

api-client
Last Version

Last Version

3.4.0-BUILD-RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

api-client
api-client
Project URL

Project URL

https://docs.api.quicko.com/

Download api-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.quicko/api-client/ -->
<dependency>
    <groupId>com.quicko</groupId>
    <artifactId>api-client</artifactId>
    <version>3.4.0-BUILD-RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/com.quicko/api-client/
implementation 'com.quicko:api-client:3.4.0-BUILD-RELEASE'
// https://jarcasting.com/artifacts/com.quicko/api-client/
implementation ("com.quicko:api-client:3.4.0-BUILD-RELEASE")
'com.quicko:api-client:jar:3.4.0-BUILD-RELEASE'
<dependency org="com.quicko" name="api-client" rev="3.4.0-BUILD-RELEASE">
  <artifact name="api-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.quicko', module='api-client', version='3.4.0-BUILD-RELEASE')
)
libraryDependencies += "com.quicko" % "api-client" % "3.4.0-BUILD-RELEASE"
[com.quicko/api-client "3.4.0-BUILD-RELEASE"]

Dependencies

compile (12)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.12
com.fasterxml.jackson.core : jackson-core jar 2.11.0
com.fasterxml.jackson.core : jackson-databind jar 2.11.0
com.fasterxml.jackson.datatype : jackson-datatype-joda jar 2.11.0
com.fasterxml.jackson.datatype : jackson-datatype-json-org jar 2.11.0
com.fasterxml.jackson.core : jackson-annotations jar 2.11.0
com.squareup.okhttp3 : okhttp jar 4.3.1
com.squareup.okhttp3 : logging-interceptor jar 4.3.1
joda-time : joda-time jar 2.10.1
org.json : json jar 20200518
com.auth0 : java-jwt jar 3.10.3
com.googlecode.json-simple : json-simple jar 1.1.1

Project Modules

There are no modules declared in this project.

Quicko API Client

The official repository of SDKs to communicate with Quicko APIs.

Quicko API is a set of REST APIs provides digital infrastructure you will need to quickly build and scale your fintech application in banking, savings, wealth, financial wellness, and insurance.

Quicko Infosoft Pvt Ltd (c) 2020.

Documentation

Quicko REST API documentation

Installation

Requirements

  • Java 1.8 or later

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>com.quicko</groupId>
    <artifactId>api-client</artifactId>
    <version>3.4.0-BUILD-RELEASE</version>
</dependency>

Others

You'll need to manually install the following JARs:

Usage

API Authentication

Instantiate ApiClient with api_key & api_secret. Use this ApiClient to call Paid APIs or to access resources on server for api user. You can obtain the key from the dashboard. https://dashboard.api.quicko.com/

// Initialize ApiUserCredentials
ApiUserCredentials credentials = new ApiUserCredentials("api_key", "api_secret");

// Initialize ApiClient with API session
ApiClient client =
       ApiClientBuilder.basic().withCredentials(credentials).build();
	   
// Use ApiClient to call Paid APIs or to access resources on server for api user
GoodsAndServicesTaxIdentificationNumber gstin = client.GST.GSP.PUBLIC.searchGSTIN(gstin);

OAuth

You can initialize ApiClient with Resource Owner session using OAuth. Use this ApiClient to access resources on server on behalf of resource owner.

Redirection based workflow

Redirection based workflow image

Steps:

  1. Navigate to the Quicko OAuth login page with the api_key
  2. A successful login comes back with a request_token to the registered redirect URL
  3. Provide the request_token using OAUTH.authorize
  4. Obtain the access_token and use that to build a ApiClient with resource owner session
// Initialize ApiClient for API User
ApiClient client =
       ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build();
	   
// When using Redirection based OAuth workflow, a successful login comes back with a request token 
// to the registered redirect URL. Use that request token to obtain resource owner access token.
String accessToken = client.OAUTH.authorize(requestToken);
	   
// Initialize ApiClient with OAuth session
ApiClient resourceOwnerClient =
       ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build(accessToken);
	   
// Use ApiClient to call APIs to access resources on server on behalf of resource owner
List<TaxPayer> taxpayers = resourceOwnerClient.IT.TAXPAYER.getTaxPayers(pan);

API based workflow

API based workflow image

Steps:

  1. Generate OTP for user using OAUTH.generateOTP
  2. User will obtain an One Time Password (OTP) on their registered email address with validity of 10 mins
  3. Provide the otp and username (user's email) to verify otp using OAUTH.authenticate
  4. Obtain the access_token and use that to build a ApiClient with resource owner session
// Initialize ApiClient for API User
ApiClient client =
       ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build();
	   
// When using API based OAuth workflow, generate OTP for resource owner.
client.OAUTH.generateOTP(username);

// Verify OTP for resource owner authentication.
String accessToken = client.OAUTH.authenticate(username, otp);
	   
// Initialize ApiClient with OAuth session
ApiClient resourceOwnerClient =
       ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build(accessToken);
	   
// Use ApiClient to call APIs to access resources on server on behalf of resource owner
List<TaxPayer> taxpayers = resourceOwnerClient.IT.TAXPAYER.getTaxPayers(pan);