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
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:
Response when used in the Cloud4Wi Dashboard From Organization level
From Location level
Response when used in the Access Journey
User is Not logged in
User Authenticated and logged in
Below an example in PHP that uses the session key to retrieve the context attributes.