How to get user_id from connected user thru baserow API

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

What are the exact steps to reproduce this issue?

I’m using baserow API in typescript.
In order to filter data on a collaborative field, i’m looking for a way to find the user_id of the connected user done thru /api/user/token-auth/

The end point /api/user/ with JWT token seams not to be any more available, so how can I do that ?

Hi @LaurentC welcome to the community!

You can use the endpoint: api/user/token-auth/ as a POST request with the data

{
“username”: “your@email.com”,
“password”: “your_password”
}

This will return a user object that will provide your ID. (along with your auth token of course)

Thank you @cwinhall , this is the solution

If you’re already authenticated, then there is also the token verify endpoint (https://api.baserow.io/api/redoc/#tag/User/operation/token_verify). If a valid refresh token is provided, then it also responds with the user id.

1 Like