End Users

Manage End Users, AI credit allocation, and consumption history.

End Users are users from your own product who open and use the editor.

They are not AuroraSendCloud Accounts and do not log in to the Platform Console. Your backend identifies them with a stable external userId when calling access and email resource APIs.

Application access token

First obtain an Application-scoped access token:

POST /access/token

This endpoint uses HTTP Basic Auth with the Application Client ID and Client Secret. It has no request body and does not create an End User.

Create or resolve an End User

POST /access/code finds or creates an End User under the authenticated Application using the request userId:

{
  "userId": "user_12345",
  "name": "Jane Doe"
}

Use the Application access token as a Bearer token. userId is required and must:

  • Be unique within the Application.
  • Remain stable across editor sessions.
  • Contain only letters, numbers, underscores, and hyphens.
  • Be no longer than 255 characters.

The endpoint returns a one-time editor code, its lifetime in seconds, and the same userId:

{
  "code": "example_code",
  "expires_in": 300,
  "userId": "user_12345"
}

Creating an email through POST /resource/email also requires userId. A previously unknown userId is created automatically by that operation.

End User scope

An End User belongs to one Application. The same external userId can be used in different Applications without sharing email records or editor sessions.

Always use the same userId when creating or selecting an email and generating the one-time editor code. This ensures the editor opens under the correct End User context.

Do not send an internal ASC Editor Plugin database ID as userId.



Did this page help you?