- Print
Simple authentication
- Print
This method involves manually inputting the ID and name of the logged-in user when executing the Shoplive player. It is utilized in situations where implementing JWT authentication between the client and server is challenging or when a rapid integration of Shoplive players is required.
Property | Description | Sample | Comment |
---|---|---|---|
userId (Required) | User ID | sample_user_id | A value that ensures the uniqueness of a logged-in user |
userName | User name (Used in the chat window) | my_nickname | If you don't specify a name, you can force user input on chat or create it randomly according to the chat settings of the campaign. |
gender | User gender | Empty value (not specified), m (male), f (female) | It allows checking the total/login viewers' data. |
age | User age | 25 | It allows checking the total/login viewers' data. |
custom | Custom data | custom data | Any data can be set up to 1KB. It allows checking the total/login viewers' data. |
userScore | User rating | 10 | Setting the user rating allows using it as a standard for personalizing entrance and drawing events according to the rating. Integers are available from -100 to 100. |
userType | User type | VIP | When entering a broadcast with set entry restrictions (Entry Type), you can reference this value to configure access exclusively for specific users (VIP). |
profile | User profile image URL | When displaying a profile image in the chat list of a broadcast, you can directly set the image path. The recommended image size is 64px X 64px. Please be cautious not to increase the image file size excessively. |
Refer to the sample code below.