Is there a way to provide application access token and user name/email as Jira integration does?


I’m building an integration recipe for my app, but struggle with the way of defining additional step (before adding to board) when user have to specify some parameters (email, access token) and then continue connecting a board. The only way I can configure here is Authentication url, but not Token base authentication params.

Is there a way to configure this parameters? As Choosing an Authentication Method, does not explain this flow, but as I’ve noticed some apps has this options.

Hi @Maksim

Welcome to the community. Is you app an integration app or is it a (dash) boardview. If it is an integration app and you want to check user credentials before the recipe is added to the board you have to use custom triggers. Custom triggers call (un)subscribe endpoint in your app and that endpoint receives the authentication object in the payload, that has to be decoded with the app’s signing secret to obtain the userId and acountId. Something like this:

async function subscribe(req, res) {
  const { payload } = req.body;
  const { inputFields, webhookUrl, subscriptionId } = payload;
  const { boardId, columnIdStatus, valueStatus, startAt } = inputFields;
  const { authorization } = req.headers;

  const { accountId, userId, aud, exp, iat, shortLivedToken } = jwt.verify(authorization, envVars.signingSecret);

With that shortLivedToken you can query the user object in monday to retrieve their email.

Hope that makes sense.

@basdebruin , thank you!

Your answer explain, the way my side should work, but, could you please clarify the Monday side configuration, as I need additional information in that request, such as email and MyApp’s access token.

I mean the following step (Jira) as an example.

hi @Maksim

Understood (I think). This is about getting access to your Jira account from monday, isn’t it. To do that you need to go through an OAuth handshake. In the monday app this is configured like this:

Now, when a user added the app to a board the OAuth flow will kick in, see OAuth and Permissions. It has been some time ago I used this as I always use seamless integration, but the idea of the OAuth flow is that you can authenticate user access to third party platform (like Jira). All the examples provided is the documents are for authenticating your monday account, but it looks like you want to authenticate the Jira account.

I don’t have specific experience with Jira, but this is what I found with regards to their OAuth flow.

Also: notice that the app on the monday side always runs under the credentials of the user who added the app to the board (e.g. a board admin).

Hope this gives you some directions.

Hello @basdebruin, thank you a lot, for pure explanation!

Yes, it was the case I’m looking for. Jira is an example)

Could you please, just clarify the UI aspect for this form as displayed on screenshot attached to previous comment. Where can I configure this parameters, like displayed on the screenshot (Email, Token), inputs/tooltips, external links on Monday side?

I’ve finished recipe development process, but can not proceed without this screen configuration.

Hi @Maksim

To be honest, I don’t know. Isn’t that shown whenever you redirect the user to the Jira authorization URL?

@basdebruin, no it happens on Monday side before any redirections. It seems like here we have to specify some hooks and provide UI, but I can’t find solution in docs and examples from Introduction to monday Apps.