Unable to issue access tokens for existing users

I have the SendBird Chat installed and working with my ReactNative app for months now. I am attempting to install and use SendBird Calls. Even though SB Chat supports authentication with only a user id (via connect method), apparently the SB Calls requires an access token. At this point I already have several users of my app, thus several users with SB accounts. None of those users have ever been issued an SB access token because up until this point I didn’t need to issue one. When I attempt to issue an access token for an existing user, via instructions found here, I am always getting a 400 server error, particularly a 400401 INVALID_API_TOKEN error. How can I issue a token for an existing user that never had a token issued if I am required to pass a token to issue a token? What am I missing here?

react-native: v0.62.2
sendbird: v3.0.108
sendbird-calls: v1.1.1

That error likely means you don’t have the application level API token in the header when trying to issue an access token for a user. This API token can be your master API token or a secondary API token, but either way this is an application level token and not specific to any particular user. More information about the headers required to make a platform API call can be found here.

You can issue an access token for a user as seen here or you can issue a token through the Sendbird Dashboard as seen in the attached screenshot.

1 Like