Back

`targets` param: Value must a valid array and UID must contain at most 36 chars. Valid chars are a-z

  • 0
  • Self Hosted
  • Functions
  • Messaging
Shiba
6 May, 2024, 15:41

await messaging.createPush( messageId: id, title: "", body: "", targets: ["cHIHAp6kQJK8KHQz7z6wM0:APA91bFkvFWgGI1i4tp3SKb4IjTFUf7_R2W398dB_pRdWQ9hkI6QIMuMzZYJ3hizUF7ZkuWiavWAYO"],

TypeScript
    image: "",
  );

dart_appwrite: ^11.0.2 AppwriteException: general_argument_invalid, Invalid targets param: Value must a valid array and UID must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, and underscore. Can't start with a leading underscore (400)

TL;DR
Developers must ensure the `targets` parameter in the `messaging.createPush()` function is a valid array, and the UID within it should contain at most 36 characters consisting of a-z, A-Z, 0-9, and underscore (excluding a leading underscore).
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more