POST api/sign ins

From Social ID Developers
Jump to: navigation, search

Contents

Description

Creates a Wi-Fi sign in.

This API is useful to implement custom Wi-Fi sign in flows. For example, if you want to automatically sign a user in using a mobile app, you can generate the username/password to send to the Wi-Fi controller using the following APIs:

  • username: use the uuid returned by this API
  • password: generate the login_token. You can use Sign in APIs.

Resource URL

  POST https://wifi.socialidnow.com/api/sign_ins

Parameters

JSON Parameters

captive_portal_id required 1 captive portal id.
captive_portal_path_name required 1 captive portal path_name.
venue_id optional 2 venue id.
venue_name optional 2 venue name.
login_token required login token.
client_mac optional client's MAC address.
ap_mac optional AP's MAC address.
remote_ip optional client's IP.

1 Required at least one captive portal identifier (id or path_name).

2 Select the venue using at least one venue identifier (id or name).

Authentication

This API requires Wi-Fi API authentication. See Authentication.

Response

Response Status

created (201) The request was successfully.
unauthorized (401) The authentication is wrong. See Authentication.
bad_request (400) Missing required parameters.
forbidden (403) Login token is not issued to the login app configured in the access profile.
not_found (404) Captive portal, venue or login token not found.

Response Body

uuid Sign in identifier.
venue_id Venue id.
venue_name Venue Name.
login_user_id User indentifier.
client_mac Mac Address linked to User.
ap_mac Access Point Mac Address.
remote_ip Remote IP Address.
accepted_at Timestamp when the sign in was accepted.
created_at Timestamp when the sign in was created.
updated_at Timestamp of last sign in update.

Example

Request

 curl -X POST 'https://wifi.socialidnow.com/api/sign_ins' \
        --header 'Accept: application/json' \
        --header 'Content-Type: application/json' \
        --user <wifi_api_id>:<wifi_api_secret> \
        --data-raw '{
           "captive_portal_path_name": "cbt-meraki-lab",
           "venue_name": "cbt-lab",
           "login_token": "2e7a8256872d469dd2e63524b6117c785f15e24d4db375bf552eb007f3b77ab7",
           "client_mac": "0E-C7-54-82-B0-AD",
           "ap_mac": "72-7C-08-93-E2-B0",
           "remote_ip": "127.0.0.1"
        }'

Response

Response Headers

HTTP/1.1 201 Created
Status: 201

Response Body

{
   "uuid": "6cf0f878-fc5e-4cac-8be9-87bb6bb61451",
   "venue_id": 9872,
   "venue_name": "cbt-lab",
   "login_user_id": "89675",
   "client_mac": "0E:C7:54:82:B0:AD",
   "ap_mac": "72:7C:08:93:E2:B0",
   "remote_ip": "127.0.0.1",
   "accepted_at": "2021-06-15T11:32:45Z",
   "created_at": "2021-06-15T11:32:45Z",
   "updated_at": "2021-06-15T11:32:45Z"
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox