Agent API Troubleshooting (Pilot)

Review these troubleshooting tips if you run into issues when calling the API.

If you recieve an HTTP 401 response, there's typically an authorization issue.

If you receive an HTTP 404 response, verify that you're using the correct token and that you're using the correct endpoint. Review Get Started with Agent API.

If you receive an HTTP 500 response, verify that you've followed the setup instructions correctly.

  • Message field in response contains "Unsupported Media Type". Use the correct Content-Type value in the header: Content-Type: application/json.
  • Error field in response contains "EngineConfigLookupException". When specifying your domain in the start session endpoint, make sure that you're using the My Domain endpoint for your org. From Setup, search for My Domain. Copy the value shown in the Current My Domain URL field.
  • Error field in response contains "HttpServerErrorException". Verify that you are using the correct agent ID in the endpoint. You can find this ID in the URL of the Agent Overview Page. When you select the agent from Setup, use the 18-character ID at the end of the URL. For example, when viewing this URL, https://mydomain.test1.my.pc-rnd.salesforce-setup.com/lightning/setup/EinsteinCopilot/0XxSB000000IPCr0AO/edit, the agent ID is 0XxSB000000IPCr0AO.
  • For other issues, review Get Started with Agent API.