Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.
Pascal Boucher edited this page Jun 12, 2018 · 2 revisions

Get token

Generally, you won't need to generate the bearer token manually since it's handle for you automatically when authenticating with the withUser method.

But sometimes, it can be handy to access the token directly especially when working with the Chatkit Client SDKs.

So for those moments, you can use the following.

@param  string $userId
@return array

Example

$token = Chatkit::getToken($userId);

OR for a sudo token

$token = Chatkit::getSudoToken($userId);

// this also works

$token = Chatkit::getToken($userId, true);

Api reference

Clone this wiki locally