Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wickrio_web_interface

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wickrio_web_interface

WickrIO Node.JS API Web Interface

  • 1.1.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30
increased by500%
Maintainers
2
Weekly downloads
 
Created
Source

WickrIO API Web Interface

The official WickrIO Web API tool. Allows to send HTTP requests to communicate with the WickrIO API, and also makes it possible to create Wickr Integrations using any programming language.

To get started with the WickrIO Web API Interface:

First, you would need to setup your system, download and install Docker and run the WickrIO Docker container. Full instructions on how to do so are available here: https://wickrinc.github.io/wickrio-docs/#wickr-io-getting-started

Configuration:

Run configure.sh after installing the Web API Interface software module, it will propmpt you to configure several properties that are needed to access the URL endpoints. The WickrIO console will walk you through entering the following values:

  1. BOT_USERNAME = This is the username of the WickrIO client. If prompted enter that value.
  2. BOT_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.
  3. BOT_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.
  4. BOT_API_AUTH_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==).
  5. HTTPS_CHOICE = Choose whether to use an HTTPS server instead of the default HTTP. It is highly recommended that HTTPS be used for security.
  6. 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.
  7. 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:

  1. 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.
  2. Base64 encode the string mentioned above.
  3. 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.
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 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.

APIHTTPURL
Send MessagePOSThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Messages
Set Message URL CallbackPOSThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback?callbackurl=<url>
Get Message URL CallbackGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback
Delete Message URL CallbackDELETEhttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/MsgRecvCallback
Get Received MessagesGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Messages?start=<index>&count=<number>
Get StatisticsGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Statistics
Clear StatisticsDELETEhttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Statistics
Create Secure RoomPOSThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms
Get RoomGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>
Get RoomsGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms
Delete RoomDELETEhttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>
Leave RoomDELETEhttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>&reason=leave
Modify RoomPOSThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Rooms/<vGroupID>
Create Group ConversationPOSThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo
Get Group ConversationsGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo
Get Group ConversationGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo /<vGroupID>
Delete Group ConversationDELETEhttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/GroupConvo/<vGroupID>
Get DirectoryGEThttps://<host>:<port>/WickrIO/V1/Apps/<API Key>/Directory

The <API Key> value is the value you entered during the configuration of the Wickr Web Interface intagration.

Usage:

Keywords

FAQs

Package last updated on 19 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc