This guide provides documentation for Wickr IO Integrations. If you're using AWS Wickr, see AWS Wickr Administration Guide.
Web Interface Integration
The Web Interface integration allows remote software the ability to interact with the associated Wickr IO client via a REST API. The Wickr IO Web Interface integration supports the REST API via either an HTTP or HTTPS interface. This REST API supports the ability to create conversations, send and receive messages to other Wickr users, and perform other Wickr tasks.
The Wickr IO Web Interface integration software is located here
REST API Configuration
During the installation of the Wickr IO Web Interface software module, you will need to configure several properties that are needed to access the URL endpoints. The Wickr IO command line interface will walk you through entering these values. The following table describes the values that you will have to enter during the configuration of the Wickr IO Web Interface:
| Value | Description |
|---|---|
| Port | The TCP/IP port that the Wickr IO bot will listen on. NOTE: you will have to add the
port to the docker run command that starts the Wickr IO Docker container so
that port is made available to the Wickr IO integration software. |
| API-Key | The API Key that is used in every endpoint call. This is the <API Key> value that is contained in every endpoint URL, as is shown in the table in the previous section. |
| Basic Authorization Token | The authentication string used to generate the Base64 value to be sent in the authorization field of the HTTP Header (Recommended: 24-character alphanumeric string). You will need to generate a Base64 value of this token and the add it to the HTTP authorization header (i.e. Basic MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNA==). |
| SSL Key Location | Full path name of the .key file (only required if you are going to use HTTPS). The file must be located in the shared directory that the integration software running on the Docker image can access. |
| SSL Cert Location | Full path name of the .cert file (only required if you are going to use HTTPS). The file must be located in the shared directory that the integration software running on the Docker image can access. |
For HTTPS and SSL support, you need an OpenSSL certificate file and a key file. Both can be created with the following command:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout my.key -out my.cert
Authentication
This version of the Web Interface supports basic authentication. The authentication will use the "Authorization" HTTP header to send the necessary authentication information to the Wickr IO server. If the proper authentication information is not presented to the Wickr IO server then an HTTP 401 response will be sent.
When using basic authentication, a base64 encoded string will be sent to the Wickr IO server. The following steps should be performed for basic authentication:
-
When the associated Wickr IO bot client is configured and associated with the Web Interface integration, the associated authentication string will be setup. You will use this string to generate the base64 encoded string.
-
Base64 encode the string mentioned above.
-
Supply an "Authorization" header with content "Basic " followed by the encoded string. For example, the string "The big red fox" encodes to "VGhlIGJpZyByZWQgZm94" in base 64, so you would send the string "Basic VGhlIGJpZyByZWQgZm94" in the "Authorization" HTTP header.
Warning
The "Authorization" header is encoded - NOT encrypted - thus HTTP basic authentication is only effective over secure connections. Always use the Web Interface REST API over HTTPS when communicating over insecure networks.
Web Interface Integration Installation
This section shows the steps to add a Wickr IO Web Interface integration. The following steps will create a Wickr IO Bot with the Web Interface integration. This integration will expose the HTTP/HTTPS interface to facilitate access to the associated Wickr IO client. When installing the Web Interface Integration on a host machine that has multiple network interfaces you can either bind the docker image that the Web Interface Integration resides on to all interfaces on the host machine OR you can bind to a specific interface by specifying the IP address.
-
Using the admin console create the associated Wickr IO bot user
by entering a display name, username, and password. -
Make a directory for your docker volume:
-
sudo mkdir /opt -
cd /opt -
sudo mkdir WickrIO -
For Docker running on Mac, if not added already, add '/opt/WickrIO' to shared paths from Docker -> Preferences -> File Sharing. See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
-
-
If you are going to use HTTPS to communicate with the Wickr IO integration you will need to generate a cert and key file. For example, you can use the following command to do so:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout my.key -out my.certYou will need to place the key and certificate files in a location the software running on the docker container can access, this is somewhere in the /opt/WickrIO directory (you created in the previous step).
-
Start the docker image, which will download the docker image if needed. Note: the name you can assign to this docker image and use for other docker commands:
docker run -v /opt/WickrIO:/opt/WickrIO -p 4001:4001 -d --restart=always --name="MyWickrIOImage" -ti public.ecr.aws/x3s2s6k3/wickrio/bot-cloud:latestPlease note the "-p 4001:4001" option which identifies which TCP port the web interface will listen on, you will have to enter that later.
If your host machine has multiple network interfaces and you would like to specify the network interface the Web Interface Integration will run on you can add the IP address of that network interface to the docker run command like so:
docker run -v /opt/WickrIO:/opt/WickrIO -p xx.xx.xx.xx:4001:4001 -d --restart=always --name="MyWickrIOImage" -ti public.ecr.aws/x3s2s6k3/wickrio/bot-cloud:latestWhere xx.xx.xx.xx is the IP address of the network interface you would like to use.
NOTE: If you are on Wickr GovCloud, please remember to modify the above command to replace docker image link with GovCloud image i.e
public.ecr.aws/x3s2s6k3/wickrio/bot-cloud-govcloud:latest -
Attach to the docker image, using the name from the previous step:
docker attach MyWickrIOImage -
Agree to the license agreement.
-
Enter the
addcommand at the prompt, filling in the username and password you created in step one. -
Enable autologin.
-
Enter the web interface integration from the list, for example
wickrio_web_interface -
Enter the port number you identified previously.
-
Enter an API Key value. This is a string that will be part of every REST call you make to the web interface bot.
-
Enter a Basic authorization token value. This is an alphanumeric value used as the basic authorization for the REST calls. It is recommended that you enter at least 24 characters.
-
If you are using HTTPS enter the location and name of the key and certificate files. These files will have to be located in the /opt/WickrIO directory you created earlier, so that the Wickr IO integration software running on the Wickr IO Docker image have access to the files.
-
The web interface bot is configured now. Start the client by entering
startand thenyand then the password.
If you have followed along so far you now have the Web Interface Bot
The following is sample output from adding a web interface bot:
Enter command:add Enter the user name:test_web_bot Enter the password:******** Creating user: "test_web_bot" Begin registration with password. Begin register new user context. Begin register existing user context. Successfully created user Successfully logged in as new user! Our work is done here, logging off! Return code from provision is: 0 The autologin capability allows you to start a bot without having to enter the password, after the initial login. NOTE: The bot client's password is NOT saved to disk. Do you want to use autologin? (default: yes): Searching NPM registry Searching NPM registry Searching NPM registry These integrations are local: - hubot These integrations are from the NPM registry: - wickrio_web_interface - wickrio-file-bot - wickrio-hello-world-bot - wickrio-example-app Please enter one of: - The full integration name from the list above - The word "search" to search the NPM registry for an integration - The word "import" to import an integration - The word "quit" to cancel adding the bot Enter the bot integration to use:wickrio_web_interface ********************************************************************** Begin setup of wickrio_web_interface software for test_web_bot Copying wickrio_web_interface from the NPM registry Installing wickrio_web_interface software for test_web_bot Installing Begin configuration of wickrio_web_interface software for test_web_bot going to use /tmp/WickrIOSvr.WDmxyv Please enter your client bot's port::4001 Please enter your client bot's API-Key::testAPIkey1234 Please create an Web API Basic Authorization Token(we recommend an alphanumeric string with at least 24 characters)::123456789012345678901234 Do you want to set up an HTTPS connection with the Web API Interface(Recommended)(y/n)::y Please enter the name and location of your SSL .key file::/opt/WickrIO/files/my.key Please enter the name and location of your SSL .crt file::/opt/WickrIO/files/my.cert Integration files written to: /opt/WickrIO/clients/test_web_bot/integration/wickrio_web_interface End of setup of wickrio_web_interface software for test_web_bot ********************************************************************** Successfully added record to the database! Enter command
Web Interface REST API
This section describes the REST APIs that are supported by the 2.x version of the Wickr IO Web Interface integration. The following table identifies each of the actions the API supports, the type of HTTP request and the URL used.
| API | HTTP | URL |
|---|---|---|
| Send Message | POST | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Messages |
| Send File | POST | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/File |
| Set Message URL Callback | POST | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback?callbackurl=<url> |
| Get Message URL Callback | GET | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback |
| Delete Message URL Callback | DELETE | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback |
| Get Received Messages | GET | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Messages?start=<index>&count=<number> |
| Get Statistics | GET | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Statistics |
| Clear Statistics | DELETE | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Statistics |
| Create Secure Room | POST | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms |
| Get Room | GET | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID> |
| Get Rooms | GET | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms |
| Delete Room | DELETE | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID> |
| Leave Room | DELETE | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>&reason=leave |
| Modify Room | POST | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID> |
| Create Group Conversation | POST | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo |
| Get Group Conversations | GET | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo |
| Get Group Conversation | GET | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo /<vGroupID> |
| Delete Group Conversation | DELETE | https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo/<vGroupID> |
The <API Key> value is the value you entered during the configuration of the Wickr Web Interface integration.
Send Message APIs
The send message APIs are used to send a message to one or more Wickr clients. To have a specific Wickr IO client send a message, send an HTTP POST message to the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Messages
The body of the POST request is JSON and the contents of that JSON will determine the type of Wickr message and the destination(s) of the message. You can send a message to one or more 1-to-1 recipients, a secure room or a group conversation. To send to a secure room or a group conversation, the room will have to been created before sending any messages. You will also need the vGroupID associated with the secure room or group conversation.
The send message API also supports sending files.
There are several JSON fields used by this API and depending on the type of message or file being sent. The following table lists all of the JSON fields that are supported by the Send Message API.
| KEY | Description |
|---|---|
| message | String value that is the message to be sent, when sending a Wickr message. Not used when sending a file. |
| users | This is a list of Wickr user IDs to send a message to. Not used when sending to a secure room or group conversation, use the vgroupid value when sending to secure room or group conversations. A separate 1on1 message will be sent to each of the users in this list. |
| bor | The burn-on-read value to use when sending the message. Optional, will default to the current value set for the conversation. |
| ttl | The time-to-live value to use when sending the message (referred to as Expiration Time in clients). Optional, will default to the current value set for the conversation. |
| vgroupid | The vgroupid to use when sending to a secure room or group conversation. Do NOT use this value when sending to 1on1 conversations. |
| runtime | Used to specify when the message(s) are to be sent. The format of this value is ISO 8601 extended format: either yyyy-MM-dd for dates or yyyy-MM-ddTHH:mm:ss (e.g. 2017-07-24T15:46:29), or with a time-zone suffix (Z for UTC otherwise an offset as [+ |
| attachment | This is a JSON object that identifies a file to be sent. The message value will be disregarded if the attachment field is used. |
| attachments | Identifies files to be sent. Currently only supports one file. Future implementation will support sending multiple files. |
When sending files, the location of the files either needs to be located on the Wickr IO system or addressable and downloadable using a specific URL. If the file is located on the Wickr IO system, it must be located where the Wickr IO client running on the Docker image can access it.
Sending a single message to multiple recipients
To send a message to one or more recipients, the HTTP POST message should contain a JSON body with the following format:
{ "message": "Welcome to Wickr! This message will self-destruct in 5 seconds.", "users": [ { "name" : "username001" }, { "name" : "username002" } ] }
The "users" field may contain an array of 1 or more users to send the message to. The message will be sent to each user on a separate 1-to-1 conversation. So, if the POST message contains 5 users then 5 messages will be sent, using the text from the "message" field.
Sending a message with Burn-on-Read
When sending a message, you can also set the specific burn on read (BOR) value for the message. The following format shows how to set the BOR value to 10 seconds:
{ "message": "Welcome to Wickr! This message will self-destruct in 5 seconds.", "users": [ { "name": "username002" } ], "bor": 10 }
Sending a message to a Secure Room
If you want to send a message to a secure room or a group conversation you will need to get the vGroupID associated with the room. The vGroupID will be returned when you create the room/conversation using the appropriate API. Also, the get rooms API will return a list of known rooms that you can send to, the vGroupID is contained in the response. To send to a secure room or group ID the following is an example:
{ "message": "Welcome to Wickr! This message will self-destruct in 5 seconds.", "vgroupid": "S8a97892379289bca979293709822718928392837492837492834" }
Send File APIs
The Wickr IO client supports three different ways to send files.
-
Sending a file that is directly accessible by the Wickr IO client.
-
Sending a file that is referenced by a URL that the Wickr IO client can download and then send.
-
Sending a file by uploading the file to the Wickr IO client in the REST API request.
Warning
Please make sure to use the correct API endpoint, since the first two methods use a different endpoint than the third method.
Send Files Residing on the Wickr IO Client
To send files that are directly accessible by the Wickr IO client you will send an HTTP POST message to the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Messages
The body content of the request will be of "application/json" type, and will contain a list of users to send the file to, the file path name where the file is located and a display name for the file. The following is an example of sending a file to a single user, where the file is located on the Wickr IO system:
{ "users": [ { "name" : "username001" } ], "attachment": { "filename" : "/opt/WickrIO/pictures/picturesent.jpg", "displayname" : "PictureSent.jpg" } }
In this example, the file to be sent is already on the Wickr IO client. The filename identifies the full path to the file. The Send Message API will respond with a 202 (Accepted) response, unless there is an error.
Warning
Like any data your integration writes to disk, files sent or received by the Wickr IO client are decrypted and remain on the host machine until removed by you or your software.
Send Files Referenced by a URL
To send files using a URL that are accessible by the Wickr IO client, you will send an HTTP POST message to the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Messages
The Wickr IO client will download the file first and then send the message. The following is an example of sending a file to a single user, where the file is located at an external URL example.com.
{ "users": [ { "name" : "username001" } ], "attachment": { "url" : "https://example.com/pictures/picturesent.jpg", "displayname" : "PictureSent.jpg" } }
You can also send files to secure rooms and group conversations using the vgroupid instead of listing the users to send to. The following is an example of sending the file to a secure room.
{ "vgroupid" : "Sd740e3077714bcc0020806bc5b318a4ca766f9fe4737e6952a81bf0d9a75407", "attachment": { "url" : "https://example.com/pictures/picturesent.jpg", "displayname" : "PictureSent.jpg" } }
Send Files Passed in the REST API Request
This is a new endpoint for the Web Interface integration as of the v5.60 version.
The send file API is used to send a file to one or more Wickr clients, or a specific room conversation. The previously described send message APIs still work to send files as well. To have a specific Wickr IO client send a message, send an HTTP POST message to the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/File
You can send a file to one or more 1-to-1 recipients, a secure room or a group conversation. To send to a secure room or a group conversation, the room will have to been created before sending any messages. You will also need the vGroupID associated with the secure room or group conversation.
The body of this POST request will use the following Key/Value pairs:
| KEY | Description |
|---|---|
| attachment | This is the actual file being sent. |
| users | This is a JSON list of Wickr user IDs to send a message to. For example: "[ user1, user2, user3 ]". This Key is not used when sending to a secure room or group conversation, use the vgroupid Key when sending to secure room or group conversations. A separate 1on1 message will be sent to each of the users in this list. If you want to send using the "users" key make sure the "vgroupid" key is not in the body. |
| bor | The burn-on-read value to use when sending the message. Optional, will default to the current value set for the conversation. |
| ttl | The time-to-live value to use when sending the message (referred to as Expiration Time in clients). Optional, will default to the current value set for the conversation. |
| vgroupid | The vgroupid to use when sending to a secure room or group conversation. Do NOT use this value when sending to 1on1 conversations using the "users" key. |
For those familiar with Postman, the following shows an example body set to send a file to two users:
Make sure to follow the formatting shown for the "users" value.
Warning
The content-type of the body is "multipart/form-data", which includes the "attachment" and the "users" or "vgroupid". The "ttl" and "bor" are optional.
Received Message
The Wickr IO client has the capability to receive messages and the Web Interface integration provides several ways to get access to those messages. The messages can be forwarded to another application or retrieved via a REST call. To have received messages forwarded to another application a callback location will need to be set (see the URL Callbacks section). If a callback method is not defined the messages will queue up on the Wickr IO client until they are retrieved. The get received messages API can be used to retrieve the messages.
The format of the messages received are described in Wickr message formats.
Note
If a callback destination is configured, the Wickr IO client will queue these messages to be sent to that destination. These messages will remain in this queue until they have been successfully posted to the desired destination.
URL Callbacks
This type of callback will define a URL that the client will connect to when a message is received, the received message will be sent to the URL. It is assumed that there is an application consuming messages that are pushed to this URL. For example, if you run a process on the same machine as the Wickr IO client you can use a URL like the following:
http://localhost:4100
Wickr can supply a sample program that accepts messages on a specific port and posts to a log file.
Set URL Callback API
You will need to configure the specific URL that the Wickr IO client will send incoming messages to. To set the URL callback value, send an HTTP POST request using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback?callbackurl=<url>
The client will respond back with a success or failure response. Any messages received after this call is performed will be sent to the defined URL.
Get URL Callback API
To get the currently set URL callback send an HTTP GET request using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback
The client will respond with either a success (200) or failure response. If there is a URL callback defined the following is the format of the body:
{ "callbackurl": "https://localhost:4008" }
Delete URL Callback
If a URL callback is no longer needed then the delete URL callback API should be used. To delete a URL callback, send an HTTP DELETE request using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback
The client will respond with a success or failure response.
Statistics APIs
Each Wickr IO client maintains statistics associated with the number of messages sent and received. The statistics will also include information about send and receive errors as well as the number of pending messages. This section describes the APIs associated with statistics.
Get Statistics API
This API will retrieve statistics that are saved on the client. These are a little different than the statistics that can be retrieved via the main console interface. Here is the HTTP GET used to get client statistics:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Statistics
The following is the type of output received in the response. Some of these statistics may be missing if they have not been changed.
{ "statistics": { "message_count": 5, "pending_messages": 0, "sent": 7, "received": 3, "sent_errors": 1, "recv_errors": 1 } }
The following table has a description of each of the statistics returned by this API:
| Statistics | Description |
|---|---|
| message_count | The number of incoming messages that are currently on the Wickr IO client. |
| pending_messages | The number of messages that are to be sent from the specific Wickr IO client. |
| sent | The number of messages that have been sent by the Wickr IO client. |
| received | The number of messages that the Wickr IO client has received. |
| sent_errors | The number of errors that have occurred while trying to send messages. |
| recv_errors | The number of errors that occurred while receiving messages. |
| pending_callback_messages | The number of messages on the callback message queue. These are messages received by the Wickr IO client, that are waiting to be send to a callback process. |
| outbox_sync | The number of outbox sync messages received. These are messages that were sent by another device for this Wickr IO client. |
Example curl script to perform a get statistics:
curl -v -k -s -X GET -H "$AUTH" http://10.2.0.1:4001/WickrIO/V1/Apps/123456/Statistics
Clear Statistics API
This API will clear the current statistics that are saved on the client. Use HTTP DELETE with the following URI to clear the statistics on the specific Wickr IO client:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Statistics
Secure Room APIs
This section describes the APIs associated with secure rooms. Using these APIs you can create, modify, get, delete and leave secure rooms that the Wickr IO client is a part of.
Create Secure Room API
This API will create a new secure room. To create a secure room, send an HTTP POST command using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms
The body of this request will contain the information associated with the room. The following is the format of the JSON data for the body of the request:
{ "room": { "title" : "Room Title", "description" : "Description of the room", "ttl" : 3600, "bor" : 60, "members" : [ { "name" : "username001@wickr.com" }, { "name" : "username002@wickr.com" } ], "masters" : [ { "name" : "username001@wickr.com" }, ] } }
The response will either be an error with a description of that error or a successful response with the vGroupId of the newly created secure room. The following is an example of a successful response:
{ "vgroupid": "S0b503ae14cc896aad758ce48f63ac5fae0adccd78ef18cde82563c63b2c7761" }
The following is a sample curl script to create a room, the data.json file contains the body of the request. The data.json contents would be something similar to that shown above.
curl -v -k -s -X POST -H "$AUTH" -H "$CONTENT" http://10.2.0.10:4001/WickrIO/V1/Apps/123456/Rooms -d "@data.json"
Get Rooms API
This API will return a list of rooms that are known by the Wickr IO client. The Wickr IO client will only know about rooms that it is a member of. To get a list of rooms send an HTTP GET to the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms
The Wickr IO client will respond with a JSON array of secure rooms. The format of the response will look like the following:
{ "rooms": [ { "description": "Room description", "masters": [ { "name" : "username001" } ], "members": [ { "name" : "username001" }, { "name" : "username002" } ], "title": "Room Title", "ttl": "7776000", "bor": "0", "vgroupid": "S00bf0ca3169bb9e7c3eba13b767bd10fcc8f41a3e34e5c54dab8bflkjdfde" } ] }
The following is sample curl script to retrieve the list of rooms:
curl -v -k -s -X GET -H "$AUTH" http://10.2.0.20:4001/WickrIO/V1/Apps/123456/Rooms
Get Secure Room API
This API will return details of a specific secure room. Send an HTTP GET using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>
The Wickr IO client will respond with a JSON structure containing information for the specified conversation. The format of the response will look like the following:
{ "rooms": [ { "description": "Room description", "masters": [ { "name" : "username001" } ], "members": [ { "name" : "username001" }, { "name" : "username002" } ], "title": "Room Title", "ttl": "-1", "vgroupid": "S00bf0ca3169bb9e7c3eba13b767bd10fcc8f41a3e34e5c54dab8bflkjdfde" } ] }
Delete Room API
In order to delete a secure room, you will need to have the vGroupID associated with that room. You can use the get rooms API to get the list of rooms known by the Wickr IO client, then determine which room to delete. Also, saving the vGroupID returned from the create room API can be used as well.
To delete a secure room, send an HTTP DELETE command using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>?reason=delete
The secure room with the same vGroupID will be deleted. This API is used for both the
delete room and the leave room action, the reason argument identifies which action
to perform. The default value for the reason argument is the delete action, in
which case the reason argument can be omitted.
The following curl script is an example of how to delete a specific room:
curl -v -k -s -X DELETE -H "$AUTH" http://10.100.8.27:6379/WickrIO/V1/Apps/123456/Rooms/S3947c067fa3edc9b0154e82e9ed1cf39904784f344e5923c4c683f27bed2faf
Leave Room API
In order to leave a secure room, you will need to have the vGroupID associated with that room. You can use the get rooms API to get the list of rooms known by the Wickr IO client, then determine which room to leave. Also, saving the vGroupID returned from the create room API can be used as well.
To leave a secure room, send an HTTP DELETE command using the following URI, make sure to
specify the reason argument with the value of leave.
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>?reason=leave
Modify Room API
This API is used to modify some of the settings associated with a secure room. The following secure room attributes can be modified using this API:
-
TTL
-
BOR
-
Description
-
Title
-
Members
-
Moderators
To modify any of these values for a secure room send an HTTP POST command using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>
The body of the request will identify the values to change and the new values to assign. The following JSON is an example of a body for the modify room API which will set the BOR and TTL values:
{ "ttl": 66000, "bor": 300 }
Group Conversation APIs
This section describes the APIs associated with group conversations. Using these APIs you can create, get or delete group conversations that the client is a part of.
Note
These APIs are only available in versions 4.35 and newer of the Wickr IO client.
Create Group Conversation API
This API will create a new group conversation. To create a group conversation, send an HTTP POST command using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo
The body of this request will contain the information associated with the group conversation. The following is the format of the JSON data for the body of the request.
{ "groupconvo": { "members" : [ { "name" : "username001@wickr.com" }, { "name" : "username002@wickr.com" } ] } }
The response will either be an error with a description of that error or a successful response with the vGroupID of the newly created group conversation. The following is an example of a successful response:
{ "vgroupid": "S0b503ae14cc896aad758ce48f63ac5fae0adccd78ef18cde82563c63b2c7761" }
Get Group Conversations API
This API will return a list of group conversations that are known by the Wickr IO client. To get a list of group conversations send an HTTP GET to the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo
The Wickr IO client will respond with a JSON array of the group conversations. The format of the response will look like the following:
{ "groupconvos": [ { "members": [ { "name" : "username001" }, { "name" : "username002" } ], "ttl": "7776000", "bor": "0", "vgroupid": "S00bf0ca3169bb9e7c3eba13b767bd10fcc8f41a3e34e5c54dab8bflkjdfde" } ] }
Get Group Conversation API
To get the details of a specific group conversation, send a HTTP GET command using the following URI with the vGroupID of the specific group conversation:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo/<vGroupID>
The Wickr IO client will respond with a JSON structure containing information for the specified conversation. The format of the response will look like the following:
{ "rooms": [ { "members": [ { "name" : "username001" }, { "name" : "username002" } ], "vgroupid": "S00bf0ca3169bb9e7c3eba13b767bd10fcc8f41a3e34e5c54dab8bflkjdfde" } ] }
Delete Group Conversation API
In order to delete a group conversation, you will need to have the vGroupID associated with that conversation. You can use the get group conversations API to get the list of conversations known by the Wickr IO client, then determine which conversation to delete. Also, saving the vGroupID returned from the create group conversation API can be used as well.
To delete a group conversation, send an HTTP DELETE command using the following URI:
https://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo/<vGroupID>
The group conversation with the same vGroupID will be deleted.