Change the "API token" from monday app

Hello,

It is very simple to get access to the token from an integration. We can “destruct” the token from the session:
const { shortLivedToken } = req.session.
From front-end apps, I am using mondaySdk in order to make API calls. Is it possible to get access to the token from front-end apps, or change it?

Thanks!

hi @Roy

In the componentDidMount you can do:

    monday.get("sessionToken").then((res) => {
      this.setState({ sessionToken: res.data });
    }

And from there you can use this.state.sessionToken wherever you need it.

Hey @basdebruin ,
That is great! there is also option to set a token? like: mondayClient.setToken(token) ?
is it the same thing with the sdk? (monday.setToken(token))

I don’t think there is, it is a session token, so the token represents the current user and its permissions.

I am looking for a way to change the token to a specific Personal API Token so every user will have the same permissions.

Hello @Roy!

Is this what you are looking for?

1 Like