Environments & Authentication

Environments

We offer two environments to make it easy for you to develop - a sandbox environment for testing purposes, and a production environment once you're ready. The two environments always have the same feature set, but the main difference is that one is deployed on the Polygon Mumbai Testnet, while the other is deployed on the Polygon mainnet. Only use the production environment when you've finished building the integration!

🏖️ Sandbox (for testing & development)

🎉 Production (once you’re ready)

🔐
Authentication

You may have noticed that some API calls, such as the /communities/:communityId endpoints and the POST /tokens endpoint, require an API key. As we are still a developing product & team, we want to make sure that we can iterate with our valued partners & users. To ensure that we can provide the best experience & support possible, we are not providing the API key openly. Please follow the instructions below to obtain an API key:

Steps to obtain an API key

  1. 1.
    If you don't already have a communityId, onboard your community to MintKudos through this form
  2. 2.
    Once you onboard as a community, contact us via the #developers channel in our Discord server. Let us know that you want to use the MintKudos API with the following information:
    • your communityId
    • your ETH address
    • what you're trying to use the MintKudos API for

How to use the API key

The API key is used to make calls that are auth-gated. We leverage Basic Auth. Follow these steps to make sure that your API calls are properly authenticated:
  1. 1.
    Obtain the communityId and API Key from us (note that you will use the same communityId in the /communites/:communityId endpoints)
  2. 2.
    Combine the communityId and API Key with a colon and then base64 encode the string
  3. 3.
    Attach the encoded string to the Authorization field of the API request’s header. Don’t forget the word Basic in front of the encoded string!
  4. 4.
    Make the call 🪄
Example code (TS)
const encodedString = btoa(communityId + ":" + apiKey)
const config = {
headers: {
"Authorization": `Basic ${encodedString}`
},
};
const result = await axios.get(
`https://api.mintkudos.xyz/v1/communities/${communityId}/configuration`,
config,
);
console.log(result.data); // ex: { remainingCustomImageCount: 0 }