All access to Invisible Collector’s API is secured and requires authorization. As such we require Bearer Authentication (also called token authentication). This works by forcing all requests to include a token called bearer token which can be understood as saying “allow access to this resource to the user holding this token”.
You can read more about this type of authentication and other authorization schemes here.
The bearer token is a cryptographically secure key generated by Invisible Collector which looks something like the following:
This token allows us to associate a request with an account.
Within the Invisible Collector system the token is linked to the company itself.
You can check what API Token a company has by navigating to the company’s settings page.
Below is an example of a request:
curl -XGET \ --header "Content-Type: application/json" \ --header "Authorization: Bearer 56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98" \ https://api.invisiblecollector.com/companies
require 'invisible_collector' # Be sure to replace the token with your own. client = InvisibleCollector::API.new(api_token: '56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98') # fetch your company information client.company.get()
import com.ic.invisiblecollector.IcApiFacade; // Be sure to replace the token with your own // This will be used in the following examples IcApiFacade apiFacade = new IcApiFacade("56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98"); // get company info example Company company = apiFacade.getCompanyFacade().requestCompanyInfo();
using InvisibleCollectorLib; using InvisibleCollectorLib.Model; // Be sure to replace the token with your own var ic = new InvisibleCollector("56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98"); // get company info example Company company = await ic.GetCompanyInfoAsync();