Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SDK with personal access token #152

Open
eloo opened this issue Feb 23, 2022 · 2 comments
Open

Use SDK with personal access token #152

eloo opened this issue Feb 23, 2022 · 2 comments

Comments

@eloo
Copy link

eloo commented Feb 23, 2022

Hi,

i'm trying to get the sdk running with personal access token but it seems not to work.
Is this a bug?
Or should it be just not be possible to use the access token for the real-time api?
At least this seems not be document anywhere

Thanks

@eloo
Copy link
Author

eloo commented Feb 23, 2022

At least in the Golang SDK i found an option to use the userId and token directy.
Seems like this is missing here?

@serjk
Copy link

serjk commented Apr 6, 2022

Hi @eloo
It's weird and just workaround but you can use setAuth from api file after that call get/post functions to check your token. I've tested this approach and it works.
https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/master/src/lib/api.ts#L57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants