Using Existing/New User Sendbird Chat User for Call

Hi All,

I’m working on implementing Sendbird Call for my app. We are already integrate our App with Sendbird Chat. Are we can use our existing chat user and convert it to contact programatically via sdk/api?

If we can do that, what is the best practice for doing that? (use existing user from chat and new registered user)

Thank you.

Hi @razibkani

There is some documentation targeting your specific use case here. You can use your chat users for your calls. However, you would need to use Access Tokens to authenticate the Calls users not session tokens.

Hi @Jason

Thanks for your reply, as I see from your link that connect & authenticate is done without access token. (link)

Is that for development purpose only or it is ok for production?
And another thing is how I issue access token from existing user?

@razibkani Sendbird Calls cannot be authenticated without an Access Token. I think the docs don’t include that point. I will ask our docs team to update.

@Jason Cool, thanks.
But how I get access token from existing token? or create new user with access token?

Is any recommendation to do that via sdk/api for sendbird chat/call?

@razibkani Hi again.

Users can have both Session tokens and Access tokens.

Session tokens and Access tokens are generated via Platform API call. I’m not sure how your application currently generates user tokens. If you are already using Access tokens for chat then you can use the same token for Calls. If you are generating Session tokens for chat you will need to also generate an Access token for each existing user.

Note: you should have a server between your client side application that requests to Sendbird to generate the user tokens.

I’ve attached a short document explaining the difference between Session Tokens and Access Tokens.
SendBird User Access Guide.pdf (560.1 KB)

Hi @Jason

Noted, Thanks for your explanation.

Hi @Jason Just to confirm, is this still the case that session tokens don’t work for calls, only accses tokens? The documentation still states that it accepts both, but just wanted to confirm first