Chatwee

sso-user/login

Logs in the user identified by his user ID. This method should be called whenever a user logs in to the host service. This method returns the ID of the newly created session.

After obtaining the session ID a natural step will be to pass it to the frontend app. Chatwee uses cookies for storing session IDs. When it's initialized it checks whether there is a cookie value set for the following key: "chatwee-SID-[CHAT_ID]" (you can find the chat ID in the Integration tab of your Dashboard). For example: if your chat ID is 5933bfcdbd616d4f73a2b506 then the cookie key will be 'chatwee-SID-5933bfcdbd616d4f73a2b506'. If there is a value in the cookie it's consumed by the application and used as a session identifier. If you use the SSO API on your own then it's your responsibility to pass the session ID you get from the /sso-user/login method to the frontend via cookies. You can also use our PHP SDK that will automatically take care of setting the corresponding cookie value


https://chatwee-api.com/v2/sso-user/login
	

GET https://chatwee-api.com/v2/sso-user/login?chatId=57c493789da1fbc017000029&clientKey=507f191e810c19729de860ea&userId=582b8fe76b0c2d22587336f4
	

"3d14222e14addf548a12ffad"
	
Name Description Type Mandatory Remarks
chatId unique chat ID string yes available in 'INTEGRATION' section of the Chatwee Dashboard
clientKey client secret string yes available in 'INTEGRATION' section of the Chatwee Dashboard
userId user ID string yes obtained with /sso-user/register method
userIp user IP address string no is necessary if ban feature needs to be used against SSO users