Basic Messages
Once a connection has been established, you may send an arbitrary message to the agent on the other end of the connection.
For user1 to send a message to verifier1, where <remote.pairwise.did>
is the
remote pairwise DID of the connection to verifier1.
curl -u $USER1 -X POST -d '{"to": {"did": "<remote.pairwise.did>"}, "content": "hello there"}' $URL/api/v1/messages -H 'Content-Type: application/json'
Similar to sending credential offers, you can use several different fields to identify the sendee such as <name>
, <id>
, <URL>
, etc. Here's an example of using an agent's name:
curl -u $USER1 -X POST -d '{"to": {"name": "verifier1"}, "content": "hello there"}' $URL/api/v1/messages -H 'Content-Type: application/json'
For verifier1 to view all messages:
curl -u $VERIFIER1 $URL/api/v1/messages
Or for verifier1 to view a specific message, where <id>
is the ID of the message to view:
curl -u $VERIFIER1 $URL/api/v1/messages/<id>
Finally, last but not least, let's end the tutorial with troubleshooting.