Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tailor-platform/sdk/llms.txt

Use this file to discover all available pages before exploring further.

Commands for managing machine users in your Tailor Platform application. Machine users are service accounts that can authenticate to your application using client credentials. They are useful for server-to-server authentication and automated processes.

machineuser

Manage machine users in your Tailor Platform application. Usage
tailor-sdk machineuser [command]
Commands
CommandDescription
machineuser listList all machine users in the application
machineuser tokenGet an access token for a machine user
When no subcommand is provided, defaults to list.
Machine user commands require your application to have an auth configuration defined with defineAuth() in your tailor.config.ts.

machineuser list

List all machine users in the application. Usage
tailor-sdk machineuser list [options]
Options
OptionAliasDescriptionRequiredDefault
--json-jOutput as JSONNofalse
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to config fileNo-
Example
tailor-sdk machineuser list
Output
[
  {
    "name": "api-service",
    "clientId": "client_abc123",
    "clientSecret": "secret_xyz789",
    "createdAt": "2024-03-01T10:00:00Z",
    "updatedAt": "2024-03-01T10:00:00Z",
    "attributes": {}
  }
]

machineuser token

Get an access token for a machine user. Usage
tailor-sdk machineuser token [options] <name>
Arguments
ArgumentDescriptionRequired
nameMachine user nameYes
Options
OptionAliasDescriptionRequiredDefault
--json-jOutput as JSONNofalse
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to config fileNo-
Example
tailor-sdk machineuser token api-service
Output
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_at": "2024-03-01T11:00:00Z"
}
The access token can be used to authenticate API requests to your Tailor Platform application. Using the Token Include the access token in the Authorization header:
curl -H "Authorization: Bearer <access_token>" https://your-app.example.com/api
Access tokens are temporary and expire after a certain period. Use the expires_at field to determine when you need to request a new token.

Build docs developers (and LLMs) love