Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/integrations/email/http-mail/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To use the HTTP email connector, you need to set up an HTTP endpoint that Logto

## Payload \{#payload}

The HTTP email connector sends a payload to the endpoint when triggering an email. It includes the recipient’s email (`to`), the email [usageType](/connectors/email-connectors/email-templates#email-template-types) indicating the authentication flow (`type`), and a `payload` containing available [variables](/connectors/email-connectors/email-templates#email-template-variables) (e.g., verification code, link, application info, organization info, user info) and the user’s [locale](/connectors/email-connectors/email-templates#email-template-localization).
The HTTP email connector sends a payload to the endpoint when triggering an email. It includes the recipient's email (`to`), the email [usageType](/connectors/email-connectors/email-templates#email-template-types) indicating the authentication flow (`type`), a `payload` containing available [variables](/connectors/email-connectors/email-templates#email-template-variables) (e.g., verification code, link, application info, organization info, user info) and the user's [locale](/connectors/email-connectors/email-templates#email-template-localization), and an optional `ip` field containing the client's IP address (if available).
Comment thread
wangsijie marked this conversation as resolved.

Example:

Expand All @@ -32,12 +32,15 @@ Example:
"to": "foo@logto.io",
"type": "SignIn",
"payload": {
"code": "123456"
"code": "123456",
"locale": "de"
}
},
"ip": "192.168.1.1"
}
```

The `ip` field can be used for rate limiting, fraud detection, or enhanced logging.

You can use this information to customize email templates in your email delivery provider.

For all available types, see [Email template](/connectors/email-connectors/email-templates#email-template-types). The full `SendMessageData` type definition is in [connector-kit](https://github.com/logto-io/logto/tree/master/packages/toolkit/connector-kit/src/types/passwordless.ts).
5 changes: 4 additions & 1 deletion docs/integrations/sms/http-sms/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ The HTTP SMS connector will send the following payload to the endpoint when it n
"type": "SignIn",
"payload": {
"code": "123456"
}
},
"ip": "192.168.1.1"
}
```

The `ip` field is optional and contains the client's IP address when available. It can be used for rate limiting, fraud detection, or enhanced logging.

You can find all of the types in [SMS templates](/connectors/sms-connectors/sms-templates), and the full type definition of `SendMessageData` in [connector-kit](https://github.com/logto-io/logto/tree/master/packages/toolkit/connector-kit/src/types/passwordless.ts).
Loading