By Default Cinema8 Interactive 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 REST APIs to generate an "on behalf of" auth token for your users.
You can use the "Login As with Username" method in C8 REST 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.
Method: POST
Url: https://cinema8.com/api/v1/authenticate/loginAsWithUsername/bearer
Header: Content-Type: application / x-www-form-urlencoded
Payload
token: {Auth-TOKEN} (this is the base64 admin key generated from
Generating API key for integrations)
username: account-name \ username
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 use the 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 REST API to register users on the system.
A sample usage of "on behalf of" token in player