Hi, I have an inbox, which i would like to send and recieve messages using the API
The API I’m using is:
https://api.hubapi.com/conversations/v3/conversations/threads/{thread_id}/messages
I’m using a private app, with the relavant scopes’s api-key to send out these requests.
When I send from hubspot user to visitor, it works perfectly:
Request:
{
"type": "MESSAGE",
"text": "Message from Hubspot",
"recipients": [
{
"actorId": "V-159626167486"
}
],
"senderActorId": "A-62822953",
"channelId": "1000",
"channelAccountId": "997975494"
}
Response 201: Created
However when I want to reponsd to that message on the same thread (from user to hubspot), reversing the sender and reciever with this request:
{
"type": "MESSAGE",
"text": "Message from User",
"recipients": [
{
"actorId": "A-62822953"
}
],
"senderActorId": "V-159626167486",
"channelId": "1000",
"channelAccountId": "997975494"
}
I get errors:
{
"status": "error",
"message": "Multiple errors validating request.",
"correlationId": "4dba105c-0db2-48b8-8ddc-894d9ed57b64",
"errors": [
{
"subCategory": "ConversationsApiError.CHANNEL_ACCOUNT_CANNOT_SEND_MESSAGE_ON_THREAD",
"message": "Channel 1000 is not eligible to send message on thread 9619400934",
"context": {
"channelId": [
"1000"
],
"threadId": [
"9619400934"
]
}
},
{
"subCategory": "ConversationsApiError.UNSUPPORTED_ACTOR_TYPE",
"message": "Actor type VISITOR is not supported for sending",
"context": {
"actorType": [
"VISITOR"
],
"operation": [
"sending"
]
}
},
{
"subCategory": "ConversationsApiError.INVALID_ARGUMENT_TYPE",
"message": "Invalid actorId type",
"context": {
"parameter": [
"actorId"
]
}
},
{
"subCategory": "ConversationsApiError.UNSUPPORTED_ACTOR_TYPE",
"message": "Actor type AGENT is not supported for receiving",
"context": {
"actorType": [
"AGENT"
],
"operation": [
"receiving"
]
}
}
],
"category": "VALIDATION_ERROR"
}
How can I reverse the roles, so I can send from both sides.
Or atleast make visitor able to send messages to actors