Language
Tools
Step 1: Obtain an application access token
Your application will need to exchange its client_id
, client_secret
, and grant_type=client_credentials
for an application access token. With this token, you can then make API requests to the Kopo Kopo API.
Step 2: Polling Transactions
To make the following request, we need to use the access_token
we just previously obtained. Security considerations:
# Using K2Connect - https://github.com/kopokopo/k2-connect-ruby (Recommended)
your_input =
{
scope: "company",
scope_reference: "",
from_time: "2021-04-12T08:50:22+03:00",
to_time: "2021-04-19T08:50:22+03:00",
callback_url: 'https://call_back_to_your_app.your_application.com'
}
k2_polling = K2Polling.new("your_access_token")
k2_polling.poll(your_input)
k2_polling.location_url # => "https://sandbox.kopokopo.com/api/v1/polling/247b1bd8-f5a0-4b71-a898-f62f67b8ae1c"
Retrieve your newly created subscription by its resource location:
pollingUrl = 'https://sandbox.kopokopo.com/api/v1/polling/5af4c10a-f6de-4ac8-840d-42cb65454216'
# Using K2Connect - https://github.com/kopo-kopo/k2-connect-ruby (Recommended)
polling = K2Polling.new(your_access_token)
polling.query_resource_url(pollingUrl)
© 2025 Kopo Kopo, Inc.