Context APIs

Context data allows to gather precious context information aobut the user, the location and access points where he is connecting and about the Cloud4Wi Org the user belongs to.

There are two ways to retrive the Context data:

  • Context APIs

  • Javascript SDK

Using Context APIs

Making a GET request to the API url with the session key appended will return with a json object depending on the context with which the API was called. For example, calling the API from the Admin Panel will return different results than calling it from within the access journey.

The API endpoint is:

https://volare.cloud4wi.com/controlpanel/1.0/bridge/sessions/{SESSION_KEY}

Response when used in the Cloud4Wi Dashboard From Organization level

{
    "status": "success",
    "data": { 
        "lang": "eng",
        "auth": {
            "level": "tenant",
            "tenantId": "1001"
        }
    }
}

Response when used in the Access Journey

User is Not logged in

User Authenticated and logged in

Example

Below an example in PHP that uses the session key to retrieve the context attributes.

Last updated

Was this helpful?