OpenAPI Generator
You can access the OpenAPI Generator in two ways:- Directly from the open source repository
- Using a cli wrapper around the above repository
- Install the cli tool with
npm install -g @openapitools/openapi-generator-cli - Clone Kibo’s OpenAPI specifications.
- Run cli pointing to the file in the OpenAPI specs folder with
openapi-generator-cli generate -g java -i kibo-open-api-specs/main/docs/openapi_commerce.json -o /var/tmp/java-commerce-client
SDK Authentication
The OpenAPI Generator doesn’t automatically generate the best API authentication. To improve this process, Kibo provides the following public packages for you to reference while implementing similar authentication in your desired language.Example
Kibo recommends using the TypeScript/JavaScript package if possible, as it includes cleaner code. The below steps describe how to use that package.- Install with
npm install @kibocommerce/sdk-authentication - Ensure you have the following information for configuration.
authHost: Kibo Commerce Authentication Host Server. It is used to request an access token from the Kibo Commerce OAuth 2.0 service.clientId: Unique Application (Client) ID of your application. This is viewable from your Dev Center.sharedSecret: Secret API key used to authenticate your application/client ID.
- Run the following code for authorization:
Alternatively, if you are using an version of Node prior to Version 18 or need to use a custom Fetch client:
Token Refresh
Kibo access tokens are valid for one hour and Kibo recommends reusing them as much as possible. This package will automatically handle the refresh of tokens. The client constructor accepts an optionalauthTicketCache.
A simple example of an in-memory cache:

