A websocket for the Messages Api.
https://developer.nexmo.com/api/messages-olympus
Messaegs api MT requests to the websocket are proxied to the messages api. Callbacks from the messages api are then caught and sent back to the websocket that originally sent the message.
Your connection request should include the Authorization
header with value Bearer <message_api_token>
. This will be used as the token for all subsequent requests.
To make a request to the messages api, simply write a websocket message in the same format as a messages api request.
Example:
{
"channel": "sms",
"from": "wstest",
"to": "4412346789",
"message_type": "text",
"text": "Leon is cool"
}
The response format is indentical to the messaegs api format, as all HTTP respones and callbacks are directly proxied to the websocket without changes.
make install
Create the file .env
at the root of the project containing the following:
export AWS_PROFILE=<profile>
export AWS_REGION=<region>
make test
make fmt
make push