This repository has been archived by the owner on Oct 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Felix' Wire API Message Tests
Fi0x edited this page Nov 28, 2020
·
11 revisions
Finding out how to send Wire messages correctly
Getting information from this website
Commands that seem useful
- broadcasts/otr/messages
- conversations/{cnv}/otr/messages
Since we only want to send messages in a single conversation, we only analyzed the second command
Used HTTP requests to get a response that can be analyzed
- conversations/messages command
- Send /clients to receive all clientIDs
- Response codes:
- 200: Contains json body
- ClientMismatch
- UserClients
- 201: Message posted
- 401: Missing authorization
- 403: Sending client not known
- 404: Conversation not found
- 412: Missing clients
- 200: Contains json body
- URL contains conversation id
- Headers
- response content type: application/json
- accept: text/html
- Body is json
- NewOtrMessage
- priority: optional
- reportMissing: optional
- data: optional
- push: optional
- sender: required
- trasient: optional
- recipients: required
- "userID": at least 1 required
- "clientID": "OTR Content" - at least 1 required
- "userID": at least 1 required
- NewOtrMessage
- Need to find out where to put the message
- OTR Content
- data
- Sending request without any token
- 401: Authentication required
- HTML returned
- Sending request with bearer token in url
- 400: invalid payload
- Sending request with bearer token in header
- 401: Authentication required
- Using JSONParser to build a JSON String to send as body
- With no bearer token or bearer token in header: 401
- With bearer token in url and a non empty body: 400 + json body: invalid sender -> I'm keeping the bearer token in url
- Using the access cookie or the bearer token leads to the same result as using the user id
- Used a clientID as sender
- Response is still 400, but with other error message
- new Error: UUID.fromText failed for recipients
- need to add valid recipients
- Used correct format for recipients
- Response is 201
- Can't receive the message since it's not encrypted correctly