Authentication
How to authenticate your requests on the Enjin Platform API.
Now that you have already set up your project, we are going to go over the process of authenticating your requests.
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), goerli.cloud.enjin.io (if using Goerli Testnet), or jumpnet.cloud.enjin.io (if using JumpNet).
  2. 2.
    Select 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

To do this, reach out for the GraphQL Playground menu at the top right corner of your screen, or you can also access it through these links.
Ethereum (Mainnet) API (GraphiQL): https://cloud.enjin.io/graphql/playground
Goerli (Testnet) API (GraphiQL): https://goerli.cloud.enjin.io/graphql/playground
Generate your unique authorization token by using the following query:
GraphQL
query GetPlayerAccessToken {
AuthPlayer(id: "userName"){
accessToken
expiresIn
}
}
Running this query should return your access Token and an expiration timeframe.
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 Ethereum Mainnet, Enjin JumpNet, or on Goerli Testnet.