I'm attempting to subscribe to a topic from the client as an anon user. the app does not require a login. Not sure where im coming up short here the targetId is my providerId i got straight from the appwrite console.
TypeScript
do {
print("Creating anonymous session...")
let session = try await account.createAnonymousSession()
print("session creation: \(session.userId)")
let subId = UUID().uuidString
let subscriber = try await messaging.createSubscriber(
topicId: "67d8c32a032423423434",
subscriberId: subId,
targetId: "provideId")
print("Successfully subscribed")
} catch {
print("Error in SubscribeAnon: \(error)")
}
}
TL;DR
Issue: Developer is attempting to subscribe to a topic as an anonymous user but encountering the error "The target could not be found."
Solution: The issue is with the `targetId` parameter in the `createSubscriber` call, which should be corrected to the actual `providerId` obtained from the Appwrite console.Recommended threads
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...
- TSL Certificate Issues
Hi Appwrite Discord Community, I got a problem with my Self-Hosted instance. I only want, that I can use my programm with the Appwrite Backend without .selfSig...
- React Native/iOS platform integrations h...
Anyone else have this issue where platform identifiers have been lost/wiped and no option/field available to update them in the console?