Follow the steps below to get started with the Gateway Protocol API. The steps will guide you on how to get your API Key and Bearer Token to authenticate.

This walk through uses the API endpoints in this documentation site!
  1. Open the auth/message endpoint and click Send
  2. Copy the output of the message field from the response body.
  3. Verify the message using a tool like Etherscan
    1. Click the Sign Message button and connect your wallet
    2. Paste the message from step 2 into the message field and sign the message
    3. Save the resulting Signature Hash value
  4. Create an account using the /accounts endpoint
    1. Pass the necessary signature, message, wallet_address, and username fields
    2. The username can be anything you want to use to identify yourself on Gateway.
    3. Save the returned token value.

      Please note that this token includes punctuation, be sure to copy and paste the ENTIRE value.

  5. Verify the account and token by using the accounts/me endpoint
    1. Enter your API token and submit the request.
Sample Account check response
{
  "created_at": "2024-09-24T06:06:41.690632Z",
  "updated_at": "2024-09-24T06:06:41.690632Z",
  "username": "demo-gateway",
  "did": "did:gatewayid:gateway:2k8i9gm6tovaxktne87k67cxolxmexi7vbrurglmdiwhwuho8pukxvz8eiwhd3fh",
  "wallet_address": "0x00000000219ab540356cbb839cbe05303d7705fa",
  "profile_picture": null,
  "username_updated_at": "2024-09-24T06:06:41.68844Z",
  "storage_size": 0
}