> ## Documentation Index
> Fetch the complete documentation index at: https://gateway-draft.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Start contributing data under 10 minutes

export const gatewayExplorerURL = "https://sandbox.mygateway.xyz/explorer";

### Tutorial

<Steps>
  <Step title="Initialize your Gateway ID">
    Make sure you have created an account using the [dashboard](sandbox.mygateway.xyz).
  </Step>

  <Step title="Create an Organization">
    If you are on testnet, you can create an organization automatically via the dashboard.

    If you are on mainnet, you can request for an organization [here](https://mygateway.typeform.com/to/hFDhPYyZ).
  </Step>

  <Step title="Copy Your Widget Key">
    Find the Widget Key underneath the "Developer Access" section of the Dashboard. Reference images below.
  </Step>

  <Step title="Find/Create a Schema">
    Find a schema that is applicable for the data you want to contribute. You can discover existing schemas using the <a href={gatewayExplorerURL} target="_blank">Gateway Explorer </a>. If you are playing around, you can use **1c2c98e4-5cbd-40db-b441-5f6c00dedeb5** to understand how it works!

    {" "}

    <Warning>This ID is for the sandbox/testnet environment.</Warning>

    To create your own schema, follow the instructions [here]().
  </Step>

  <Step title="Define API Call Body">
    Now you can insert the above information into the API call body found below:

    ```javascript
    const session = JSON.stringify({
      key: "YOUR-WIDGET-KEY",
      issuer: "YOUR-GATEWAY-ID",
      owner: "CUSTOMER-EMAIL-OR-WALLET",
      dataModel: "YOUR-DATA-MODEL-ID",
      callbackUrl: "YOUR-SUCCESS-URL",
      claim: {
        /*OBJECT WITH DATA*/
      },
    });
    ```

    <Tip>
      Claim fields are in JSON format. For example, a string would be "teststring":
      "value".{" "}
    </Tip>
  </Step>

  <Step title="Call the API">
    Generate a session for the user based on the parameters you have passed.

    ```javascript
    async function generateSession() {
    const response = await axios.post(
      "https://widget.mygateway.xyz/api/issue/generate-session",
      session,
    );
    window.location.href = response.data.session.url
    }

    const generateButton = document.getElementById("generateSession");

    generateButton.addEventListener("click", generateSession);

    ```

    <Info>Utilizing a button on the front end is optional, the URL for a user can be passed in other methods. However, having a button is recommended in most cases.</Info>
  </Step>

  <Step title="Get the link from the response and send to user">
    The response that you should receive is something like this:

    ```javascript
    {
        "session": {
            "url": "https://widget.mygateway.xyz/issue/cc348d85-c723-4183-b174-8424793d481f"
        }
    }
    ```

    You can now pass this to the user to complete.
  </Step>
</Steps>

### Video Tutorial

<iframe width="560" height="315" src="https://www.youtube.com/embed/NP8QyQaK04I?si=givsr7uOMoSoD2Hr" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />
