API - Virtual Message
I get the error
{"code":"invalid_type","expected":"object","received":"undefined","path":["channel"],"message":"Required"}, {"code":"invalid_type","expected":"object","received":"undefined","path":["member"],"message":"Required"}, {"code":"invalid_type","expected":"object","received":"undefined","path":["guild"],"message":"Required"}, {"code":"unrecognized_keys","keys":["body"],"path":[],"message":"Unrecognized key(s) in object: 'body'"}
when trying to use the endpoint any reason why?Solution:Jump to solution
That would probably be part of it yes. You need to use a KIAI api token as authorization
20 Replies
My body is
Hi,
message
under channel
is something you do not need to provide https://api.kiaibot.com/docs/static/index.html#/v1%2F/post_v1_guild__guildId__virtual_message
It seems like it's because of that
but let me double-checkso remove the channel object?
No, try removing
message
under the channel object1 second.
still get the same error.
The exact same?
yep.
Can I get back to you a bit later in the day about this? I need to finish something IRL
Yeah sure.
Thanks
here is the error, but in a more readable state.
It's saying that channel, member, and guild are missing which judging from https://discord.com/channels/744282929684938844/1242393263365820507/1242393839298285639 should not be true. However, with the exact same POST request as yours (excluding of course changing the guild id and removing the
message
from channel
, I get success
Right. Let me try again with your format..
I still get a
400: Bad request
Same error message.
I wonder is it because I'm using a Discord Bot Token as my authorization, and not a Kiai token?
If so I would like to request one:
- Bot ID: 937703207042449438
- Application Name: Xmas LumeSolution
That would probably be part of it yes. You need to use a KIAI api token as authorization
mmm.