Licensing Process

Here, we're going to walk you through the 4 steps needed to register for a Developer License and configure it for API access.


Developer License Issuance

Step 1: Approving the Dev License to use of $DIMO

DIMO Check-in

Please ensure that your spender wallet has both $DIMO and $MATIC available. $DIMO will be spent on issuing the Developer License, and $MATIC will be spent on transaction fees.

To start issuing a Developer License, you will first need to approve the Developer License Contract (0xc194631194671a44a9eF1c59DF290ef0F3E76EA1) to be a spender of DIMO tokens in your spender wallet. To do so, you will need to call the approve function on the DIMO Token Contract (0x...61db) after connecting your spender wallet.

Here, the transaction should always go through even if you don't have $DIMO in your wallet. But be aware that not having enough $DIMO in your wallet will cause failed transactions in the next step.

The approve function takes in two input parameters:

InputTypeDescription

spender*

address

The 0x address of the Developer License Contract (0x...6EA1)

amount*

uint256

The amount of DIMO tokens you want to approve the Dev License to spend, in units of wei. To approve 1 $DIMO, append 18 zeros to convert into wei. You can also use https://eth-converter.com/ to facilitate the calculation.

Developer Notes

You would probably need around 2 $DIMO to issue a license, so the approved amount should be higher than that (recommend around 5~10 $DIMO to start). This value is subjected to change due to the volatility of $DIMO.


Step 2: Issue the Dev License

This is also known as Create an App if you are familiar with how most integrations work. Once you have approved the spending and have enough $DIMO in your spender wallet, head over to the Developer License Contract (0x...6EA1) and issue the Developer License. There are 4 ways to issue a Developer License:

  1. Issue in DIMO Credits ⚠️(We don't recommend using this just yet)

    This function is used when you are issuing the Developer License to the account that you used for issuance in DIMO Credits.

  2. Issue in DIMO Credits to a targeted address ⚠️(We don't recommend using this just yet)

    This function is used when you are issuing the Developer License to another account other than the one that you are using to issue the license. This function spends DIMO Credits in order to perform the issuance.

  3. Issue in DIMO Tokens

    This function is used when you are issuing the Developer License to the account that you used for issuance in DIMO Tokens.

  4. Issue in DIMO Tokens to a targeted address

    This function is used when you are issuing the Developer License to another account other than the one that you are using to issue the license. This function spends DIMO Tokens in order to perform the issuance.

Your DIMO Developer License is granted as you trigger the issuance, sign the transaction, and when the transaction is marked as complete. A successful transaction will return a few things: tokenId, owner, and clientId. The tokenId is your public ID for your Developer License, the owner being the holder account, and the clientId is what you will need to obtain access to the DIMO API.


Developer License Configurations

Step 3: Configuring the Dev License

Mentioned in Authentication, you will need a set of clientId and domain to get started with the API access. The clientId is obtained in Step 2: Issue the Dev License while you still need to configure the domain on the Developer License by calling setRedirectUri.

Set Domain (aka Redirect URI)

This function is used to configure the domain needed for the authentication steps. With a combination of clientId and an enabled domain, you will be able to exchange for an access_token to the DIMO API.

Step 4: Enable Signer(s)

Signers are essentially the trusted signer wallets to perform the wallet-based authentication flow. The Developer License (aka your app) has a clientId and a domain, but in order for you to authenticate and obtain a valid access_token to the DIMO API, you will need to provide a signer wallet. By default, a Developer License that was created will not have any signer provisioned, even if you are the holder of the license.

Enable Signer

This function is used to enable a signer on the Developer License. By indicating the tokenId of your Developer License, and the signer's address, the successful transaction here will grant you access to authenticate with the DIMO Auth Server.

InputTypeDescription

tokenId*

uint256

The identifer to your Developer License.

signer*

address

The 0x address of the wallet that's approved as a signer.

DIMO Check-in

The signer process avoids any bad actors getting hold of your clientId and domain. Anyone that is NOT a valid signer cannot access your access_token.

Last updated