Skip to main content

Overview

This guide walks you through a minimal, end-to-end flow:
  • Set a host and request API credentials.
  • Create an account and verify the email address.
  • Log in, refresh a token, and log out.
  • Send a simple XMPP message.
The Agent API is intended for trusted back-end services that can protect API keys and secrets.

1. Set up environment variables

Request an API key and secret from the operator at https://DOMAIN/RequestApiKey.md. Replace DOMAIN with your Neuron host.

2. Create an account

Account/Create also logs you in and returns a JWT. The request must be HMAC-signed with the API secret. See the signing details in Authentication.
Example response:

3. Verify the email address

You will receive a verification code by email. Submit it to enable the account.

4. Log in to get a JWT

Login uses an HMAC signature based on userName, host, and a random nonce.
Set JWT to the jwt value from the response.

5. Refresh and log out

6. Send a text message

Authentication flow