Creating Sub Users via API

Prerequisites

  1. Login into the MyWiFi Control Panel
  2. Navigate to Branding section
  3. Note your MyWiFi Dashboard subdomain located in the Personalize your application's URL field
  4. Note your identifier key located in the App Secret Key field 
  5. All API Requests must be made to the API Endpoint that includes your MyWiFi Dashboard Subdomain as the Endpoint subdomain, with the App Secret Key submitted as the identifier parameter. 

Conventions

  • All Requests are made securely over HTTPS
  • All Requests are x-www-form-urlencoded 
  • Each Required Parameter must be included in the Request Payload
  • All Responses are in JSON format
  • Responses for each method are listed under the method
  • Appropriate HTTP Status Codes will always be returned on Success or Error

API Endpoint

Host:      

<subdomain>.mywifi.io

Endpoint URL:        

https://<subdomain>.mywifi.io/api/


Request create-sub-user:

  • Method: POST
  • URL: /api/create-sub-user

Parameters: 

  • identifier (string) [required] 
  • first_name (string) [required]
  • last_name (string) [required]
  • mobile_phone (string) [required]
  • email (string) [required]
  • password (string) [required]
  • quickreport (string: true/false) (optional)
  • readonly (string: true/false) (optional)
  • quickreport_location_id (integer) (optional)

phone_number:
The  phone_number format should be +CC(YYY)ZZZ-XXXX

email_address:
The  email_address must be formatted as a proper email address

password:
The password must be at least 5 characters in length

quickreport:
The  quickreport must be “true” or “false”

readonly:
The  readonly must be “true” or “false” 

quickreport_location_id:
The  quickreport_location_id must be a Location ID# from the MyWiFi Dashboard

Response:

Success

  • Status: 200
  • Response:
    {
    "status": "success",
    "message": "Sub User has been successfully created."
    }

Error

  • Status: 400
  • Response:
    {
    "status": "error",
        "message": {
            [error_msgs]
       }
    }

Did this answer your question?


Platform Support

Powered by HelpDocs