<filename>api_use_pillar/create_message.py
import requests,json

# Get access token from a bot
ACCESS_TOKEN = "<KEY>"
# Get the roomID from https://developer.webex.com/docs/api/v1/rooms/list-rooms
roomID = "Y2lzY29zcGFyazovL3VzL1JPT00vNDMxNTMzNTAtODg4YS0xMWVjLWE0NTUtMTMyODFhYzhiYWVm"

m = {
    #"roomId": roomID,
    #"toPersonId": "<KEY>",
    "toPersonEmail": "<EMAIL>",
    "text": "Tano esto es un test desde un bot de webex, soy matias"
}

r = requests.post(
    "https://webexapis.com/v1/messages",
    data=json.dumps(m),
    headers={
        "Authorization": "Bearer {}".format(ACCESS_TOKEN),
        "Content-Type": "application/json",
    },
)
print(r.status_code)



<filename>api_use_pillar/create_message.py
import requests,json

# Get access token from a bot
ACCESS_TOKEN = "<KEY>"
# Get the roomID from https://developer.webex.com/docs/api/v1/rooms/list-rooms
roomID = "Y2lzY29zcGFyazovL3VzL1JPT00vNDMxNTMzNTAtODg4YS0xMWVjLWE0NTUtMTMyODFhYzhiYWVm"

m = {
    #"roomId": roomID,
    #"toPersonId": "<KEY>",
    "toPersonEmail": "<EMAIL>",
    "text": "Tano esto es un test desde un bot de webex, soy matias"
}

r = requests.post(
    "https://webexapis.com/v1/messages",
    data=json.dumps(m),
    headers={
        "Authorization": "Bearer {}".format(ACCESS_TOKEN),
        "Content-Type": "application/json",
    },
)
print(r.status_code)



# Get access token from a bot # Get the roomID from https://developer.webex.com/docs/api/v1/rooms/list-rooms #"roomId": roomID, #"toPersonId": "<KEY>",