I’m trying to receive incoming messages over a custom channel. I created the custom channel in my Front instance and copied the channel id from the Incoming API Endpoint. In order to test, I added the necessary values on the API docs page and gave it a try:
➜ ~ curl --request POST \
--url https://api2.frontapp.com/channels/cha_g65ng/incoming_messages \
--header 'accept: application/json' \
--header 'authorization: Bearer XXXXX' \
--header 'content-type: application/json' \
--data '
{
"subject": "Sample Subject",
"body": "Sample Body"
}
'
{"_error":{"status":400,"title":"Bad request","message":"Body did not satisfy requirements","details":["body.sender: missing"]}}
I tried a couple of modifications hoping to back into a solution, but still the same general error:
➜ ~ curl --request POST \
--url https://api2.frontapp.com/channels/cha_g65ng/incoming_messages \
--header 'accept: application/json' \
--header 'authorization: Bearer XXXXX' \
--header 'content-type: application/json' \
--data '
{
"body": {
"body": "Sample Body",
"sender": "Tim Kral"
},
"subject": "Sample Subject"
}
'
{"_error":{"status":400,"title":"Bad request","message":"Body did not satisfy requirements","details":["body.sender: missing","body.body: should be a string"]}}
And:
➜ ~ curl --request POST \
--url https://api2.frontapp.com/channels/cha_g65ng/incoming_messages \
--header 'accept: application/json' \
--header 'authorization: Bearer XXXXX' \
--header 'content-type: application/json' \
--data '
{
"body": "Sample Body",
"body_sender": "Tim Kral",
"subject": "Sample Subject"
}
'
{"_error":{"status":400,"title":"Bad request","message":"Body did not satisfy requirements","details":["body.sender: missing"]}}
Any help is greatly appreciated.
Best answer by timkral
View original