PSOT multiple messages in JSON
Hi,
I'd like to send multiple messages using webhooks and JSON but the API is returning an error 50006 "Cannot send an empty message".
My header mentions that the content type is JSON and here's my code :
{"messages":{
"message1": [
{ "username": "Dino",
"content": "Test1"
}
],
"message2": [
{"username": "Dino",
"content": "Test2"
}
]
}
}
What am I doing wrong ?
What am I doing wrong ?
0
-
bruh this is not stackoverflow. it's a place for feature suggestions and feedback about current ones.
-1 -
That's not how the api works, that's what you're doing wrong.
Webhooks can send multiple embeds, but not full messages.
0 -
In principle, you can send any content in HTTP request, it only need to be serializable into a string. So, it could be multiple JSON object.
0 -
Yeah I resolved the problem myself.
I just iterated through my json file and managed to do what I wanted.
Thank you guys :)0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires