API Request Response - JimAnkrom/sway GitHub Wiki

Create User

POST /users

returns token, channel

token: req.body.token, channel: { name: chan.name, description: chan.description, helpUrl: chan.helpUrl, url: chan.url, ip: chan.ip }

Response

Sway contains express middleware that enables the system to communicate with single or multiple users. As such, sometimes it will not return a response, other times it may return system-level information to control the users. The response may result in any combination of the following.

  • token: user token
  • channel: channel information
  • redirect: url to immediately redirect to
  • message: message to send back to user
  • config: assigned to sway.userConfig
  • api: assigned to sway.api
⚠️ **GitHub.com Fallback** ⚠️