Language

K2Connect helper libraries

Kopo Kopo provides the following libraries for your use to simplify integration with the Kopo Kopo API

Testing in Sandbox?

Either set the environment to sandbox (if using a Kopo Kopo helper library) or provide https://sandbox.kopokopo.com/ as the hostname if using a different library

# Using Kopo Kopo Connect - https://github.com/kopokopo/k2_connect_ruby
require 'k2_connect_ruby'
k2 = K2Connect::K2ApiClient.new(key: ENV["KOPOKOPO_APP_KEY"], secret: ENV["KOPOKOPO_APP_SECRET"]) do |config|
  config.environment = :sandbox
end
// Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-node
const options = {
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
    apiKey: 'YOUR_API_KEY',
    baseUrl: 'https://sandbox.kopokopo.com'
}
//Including the kopokopo module
var K2 = require("k2-connect-node")(options)
not available
# Using Kopo Kopo Connect - https://github.com/kopokopo/k2_connect_python
client = kopokopo.Client(
  key = os.environ['KOPOKOPO_APP_KEY'],
  secret = os.environ['KOPOKOPO_APP_SECRET'],
  environment = 'sandbox'
)
// Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-php
use Kopokopo\SDK\K2;

// Do not hard code these values
$options = [
    'clientId' => 'YOUR_CLIENT_ID', 
    'clientSecret' => 'YOUR_CLIENT_SECRET',
    'apiKey' => 'YOUR_API_KEY',
    'baseUrl' => 'https://sandbox.kopokopo.com'
];
$K2 = new K2($options);

Add the following to your Package.json:

k2-connect-node: "1.0.0"

Or run:

npm install k2-connect-node

Check out the API docs, or see the source on GitHub.

Add the following to your Gemfile:

gem 'k2_connect_ruby', '~> 1.0'

Or run:

gem install k2_connect_ruby

Check out the API docs, or see the source on GitHub.

Add the following to your requirements.txt:

k2_connect_python>=1.0.0

Or run:

pip install k2_connect_python

Check out the API docs, or see the source on GitHub.

Add the following to your composer.json:

"kopokopo/k2-connect-php": "1.0.0"

Or run:

composer require kopokopo/k2-connect-php

Check out the API docs, or see the source on GitHub.