I get an error when I try to send a message

I get an error when I try to send a message in Python. What could be the reason?

import requests, json
def sendMessage(keyAPI, chatID, keySESSION, message):
	data = {
		"message_type": "MESG",
		"user_id": "1",
		"message": message
	response = requests.post(f"https://api-{keyAPI}.sendbird.com/v3/group_channels/{chatID}/messages", headers = {"session-key": keySESSION}, data = json.dumps(data))
{"message":"Invalid value: \"JSON body.\".","code":400403,"error":true}

Hi @wine,

Welcome to the Sendbird community. It looks like you’re trying to use a session-key instead of your API token. When using the Platform API you must use your API Token along side the ‘Api-Token’ header.

Please see the following for reference: Prepare to use API | Chat Platform API | Sendbird Docs

Additionally, can you share what the body of message is? The other values you’re passing into data look correct.