Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Messaging → Create Subscriber
AI-generatedOverview
This node interacts with the Appwrite API to create a subscriber for a messaging topic. It is useful in scenarios where you want to manage messaging subscribers programmatically, such as adding users or devices to receive notifications or messages from a specific topic. For example, you can automate subscriber creation when a new user registers or when a device is added to your system.
Use Case Examples
- Create a subscriber for a topic to send targeted notifications.
- Add a device ID as a subscriber to a messaging topic for push notifications.
Properties
| Name | Meaning |
|---|---|
| Topic ID | The ID of the messaging topic to which the subscriber will be added. |
| Subscriber ID | The unique identifier for the subscriber. Can be generated using unique() to ensure uniqueness. |
| Target ID | The target identifier, which can be a user ID or device ID, representing the subscriber's endpoint. |
Output
JSON
subscriberId- The unique identifier of the created subscriber.topicId- The ID of the topic to which the subscriber was added.targetId- The target ID associated with the subscriber, such as a user or device ID.status- The status of the subscriber creation operation, indicating success or failure.
Dependencies
- Appwrite API key credential for authentication
Troubleshooting
- Ensure the Topic ID exists and is valid; otherwise, the subscriber creation will fail.
- Verify that the Subscriber ID is unique to avoid conflicts.
- Check that the Target ID corresponds to a valid user or device in the system.
- Common errors include authentication failures due to invalid API keys or insufficient permissions, which require verifying credentials and access rights.
Links
- Appwrite Messaging API Documentation - Official documentation for Appwrite's messaging service, including subscriber management.