Connect to Enjin API
How to connect to the Enjin API
Allow your app to communicate fluidly with the Enjin smart contract.
This will allow you to programmatically view wallet inventory, mint assets from your wallet, send assets from your wallet, and request assets from users' wallets.

Step 1: Find your App ID & AppSecret

Firstly, you will need to locate your AppID and AppSecret on the Enjin platform.
  1. 1.
    Go to cloud.enjin.io (if using Mainnet), or jumpnet.cloud.enjin.io (if using JumpNet).
  2. 2.
    Create or select your Project.
    1. 1.
      More information here, on how to create your project.
  3. 3.
    Select Settings in the sidebar.
You will find your AppID and AppSecret in the Settings panel.

Step 2: Generate your Authorization Token

Generate your unique authorization token by using the following query:
GraphQL
1
query GetPlayerAccessToken {
2
AuthPlayer(id: "userName"){
3
accessToken
4
expiresIn
5
}
6
}
Copied!
IMPORTANT: Only store your App Secret server side. Do not store your App Secret inside your executable file or hackers will be able to decompile your game and mint tokens on your behalf.

Step 3: Use your App Secret

You can now use your AppSecret to run queries from your server by querying the Enjin API. You can do this either via GraphiQL PlayGround on Mainnet or on JumpNet.
  1. 1.
    Mainnet: cloud.enjin.io/graphql/playground
  2. 2.
    JumpNet: jumpnet.cloud.enjin.io/graphqlplayground
Last modified 2mo ago