Jump toKeys and authentication
Keys and authentication
Getting a keyLink to this section
The Data API is part of the Enterprise plan. Keys belong to an organisation, not to a person, and only an organisation admin can create or revoke them. Organisations on a free trial cannot create keys until the paid plan starts.
- Sign in as an organisation admin and open Account > API access.
- Choose Create key, give the key a name that says where it will run, pick its scopes, and optionally an expiry date. Tick the box to accept the TenderHub terms and conditions on behalf of your organisation.
- Copy the key to your secret store. It is shown once and cannot be displayed again.
An organisation can hold up to 2 active keys and create up to 5 keys per day. Keys expire after one year unless you choose a different date (at most two years ahead).
AuthenticationLink to this section
Send the key in the X-Api-Key request header on every call. Requests without a valid key get 401. The Authorization header is not used by this API.
Keys look like thub_live_ followed by 49 letters and digits, 59 characters in total. The last six characters are a checksum, so a mistyped key is rejected before it is looked up.
curl -H "X-Api-Key: thub_live_YOUR_KEY" https://api.tenderhub.com.au/api/integration/v1/meScopesLink to this section
Each key carries one or more scopes. A call to an endpoint outside the key's scopes gets 403 scope_missing. New keys get every scope unless you untick some when you create them.
| Scope | Grants |
|---|---|
| awards:read | The awards feed: awarded opportunities with their suppliers and values. Also the supplier changes feed. |
| buyers:read | Buyer list and search, buyer detail and a buyer's awarded opportunities. Also the supplier changes feed. |
| opportunities:read | The opportunities feed, with optional category, state and location filters, and one opportunity by its TH- reference. |
| suppliers:read | Supplier search (ABN, name or slug), supplier detail, a supplier's award history and the supplier changes feed. |
Some endpoints need no scope and work with any valid key: GET /me and GET /usage (your own key and your own usage), and the /reference endpoints (TenderHub's public categories, locations, states, statuses and opportunity types, which hold no award or customer data). They still count towards your rate limit and quota.