Xero

Get Xero Access Token

Gets the access token the other Xero tools need. The bot calls this first.

Unverified

What the model is told

Get an access token for Xero. Call this once before any other Xero tool, then pass the access_token value from the response to those tools. Never read the token aloud or share it with the customer. Tokens last 30 minutes. If a Xero tool returns a 401, call this again to get a fresh token.

Request

POSThttps://identity.xero.com/connect/token

Headers

  • Content-Typeapplication/x-www-form-urlencoded
  • AuthorizationBasic YOUR_BASE64_XERO_CLIENT_ID_AND_SECRET

Body

grant_type=client_credentials&scope=accounting.transactions%20accounting.contacts

Parameters

None.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "57982fdb-7058-4bae-8e2f-0f68ebb91167",
    "type": "HTTP_REQUEST",
    "label": "Get Xero Access Token",
    "name": "get_xero_access_token",
    "customName": false,
    "description": "Get an access token for Xero. Call this once before any other Xero tool, then pass the access_token value from the response to those tools. Never read the token aloud or share it with the customer. Tokens last 30 minutes. If a Xero tool returns a 401, call this again to get a fresh token.",
    "parameters": [],
    "config": {
      "endpoint": {
        "method": "POST",
        "url": "https://identity.xero.com/connect/token"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/x-www-form-urlencoded"
        },
        {
          "name": "Authorization",
          "value": "Basic YOUR_BASE64_XERO_CLIENT_ID_AND_SECRET"
        }
      ],
      "body": "grant_type=client_credentials&scope=accounting.transactions%20accounting.contacts",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.