AlmondTill/G3N API

Connect your AI assistant

Connect Claude or ChatGPT to one organization as yourself — paste one URL, sign in, pick the organization and the access: Read, or Read and make changes you confirm.

Integrations · a play in 2 steps.

In the office

Let Claude, or any assistant that speaks the same protocol, read your shop — or, if you choose, make changes it first shows you and you confirm: approve the connection for one organization as yourself, pick Read or Read and make changes, and disconnect it whenever you like. Any member of the organization can connect their own assistant; it acts as that person, within their own role’s access; the owner sees and can disconnect every connection.

Where it starts: the office’s Connect your AI assistant page.

Connect your AI assistant — /connect-assistant
Connect your AI assistant — /connect-assistant

Step 1. Review who is asking and where the sign-in code would go.

Step 2. Approve for ONE organization — Read, or Read and make changes — or deny; your browser carries the answer back.

What you see

The organization the example shop’s owner would approve is Linden & Vale.

Try it

Walked with screenshots in the owner’s manual: chapter 7 — Connect your AI assistant

For developers — the calls

The steps

  1. Review who is asking and where the sign-in code would go. — connectorAuthorization
  2. Approve for ONE organization — Read, or Read and make changes — or deny; your browser carries the answer back. — approveConnectorAuthorization

The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

connectorAuthorization

connectorAuthorization — query · Review an AI-assistant sign-in request (Claude, ChatGPT, …) — who is asking, where the sign-in code would be sent, and which of your organizations it could act in.

Example request

graphql
query ExampleConnectorAuthorization($responseType: String!, $clientId: String!, $redirectUri: String!, $codeChallenge: String!, $codeChallengeMethod: String!, $state: String) {
  connectorAuthorization(responseType: $responseType, clientId: $clientId, redirectUri: $redirectUri, codeChallenge: $codeChallenge, codeChallengeMethod: $codeChallengeMethod, state: $state) {
    clientId
    clientName
    clientSource
    redirectUri
    redirectHost
    loopback
    scope
    offlineAccess
    changesHint
    resource
  }
}

Variables:

json
{
  "responseType": "<response type>",
  "clientId": "<client id>",
  "redirectUri": "<redirect uri>",
  "codeChallenge": "<code challenge>",
  "codeChallengeMethod": "<code challenge method>",
  "state": "<state>"
}

Example response

json
{
  "data": {
    "connectorAuthorization": {
      "clientId": "<client id>",
      "clientName": "Blue jeans",
      "clientSource": "<client source>",
      "redirectUri": "<redirect uri>",
      "redirectHost": "<redirect host>",
      "loopback": true,
      "scope": "<scope>",
      "offlineAccess": true,
      "changesHint": true,
      "resource": "<resource>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

approveConnectorAuthorization

approveConnectorAuthorization — mutation · Approve or deny an AI-assistant sign-in — approving connects the assistant to ONE organization as you, with the access you choose (Read, or Read and make changes), and sends it its sign-in code.

Example request

graphql
mutation ExampleApproveConnectorAuthorization($decision: String!, $orgId: ID, $responseType: String!, $clientId: String!, $redirectUri: String!, $codeChallenge: String!, $codeChallengeMethod: String!) {
  approveConnectorAuthorization(decision: $decision, orgId: $orgId, responseType: $responseType, clientId: $clientId, redirectUri: $redirectUri, codeChallenge: $codeChallenge, codeChallengeMethod: $codeChallengeMethod) {
    redirectTo
  }
}

Variables:

json
{
  "decision": "<decision>",
  "orgId": "01900000-0000-7000-8000-1971e30a0000",
  "responseType": "<response type>",
  "clientId": "<client id>",
  "redirectUri": "<redirect uri>",
  "codeChallenge": "<code challenge>",
  "codeChallengeMethod": "<code challenge method>"
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "approveConnectorAuthorization": {
      "redirectTo": "<redirect to>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}