In Default Cinema8 Videos play as anonymous in all platfoms.In this case you can track your users anonymously and all interactions collected by the systems will be tagged as anonymous.
To track certain users who has already signed in to one of your systems (This can be any intranet , extranet , mobile app or LMS systems) ,you can use Cinema8 Data Apis to generate an "on behalf of" auth token for your users.
You can use the "Login As with Username" method in C8 Data Api.After exposing this api and generated an "on behalf of" token for your users , pass this token to any web service call or use this token with JS API to track your signed in users.
Here you need to send username information with your account name to the service.
as in the above example, accountname \ [username].
Api returns 200 status code with the generated auth token.Generated auth token is valid for 6 hour , after 6 hour the token will be invalid and you need to generate a new token for your users. If you want, you can simply put the tokens on a 6-hour expirable map.
You can usethe token from this map in a valid way for at least 6 hours.
In case the user is not in the system, 401 status code will be returned. Indicates that there is no [user.name] user in the system, You can also create the user before trying to generate the token for unregistered users. See the Cinema8 Data API to register users on the system.
A sample usage of "on behalf of" token in player