Trying to kill off a web messaging conversation from our backend service when a bot finishes routing. The guest API docs only show client-side methods, so I’m hitting the REST endpoint directly. POST /api/v2/guest/webmessaging/conversations/{conversationId}/close returns a 404 every time, even though the ID pulls straight from the webhook payload. The Node SDK doesn’t expose a closeConversation method for this either. Anyone got the exact auth header setup or a working fetch example? Checked the scope bindings three times. Still getting 404s on the close call.
You’re likely hitting the wrong endpoint scope. The guest API is for client-side tokens. You need the Conversation API with conversation:write scope.
const client = await PlatformClient.init({ clientId, clientSecret });
await client.ConversationsApi.closeConversation(conversationId, { reason: "Bot finished" });
Check your OAuth scopes.