Workflows: Custom Auth Invalid Token on Webhook Trigger but works fine when Run on Retool

I have created a workflow that uses a function to perform pagination.

the token is stored in variable CRM_A_TOKEN

It works fine when the 'Run' button was pressed. But whenever I trigger it using webhook, it says invalid token.

Hey @aseco!

Would you mind sharing how you have auth configured for that resource? I'm wondering exactly how you're getting the value to replace CRM_A_TOKEN.

Hi, it's via custom auth.

auth workflow

refresh auth

Does the custom auth flow use client credentials for the OAuth step? One common hang-up that folks have run into in the past is that Workflows doesn't support user-based authentication. Typically, for folks using OAuth that can be avoided either by using client credentials or sharing credentials across all users. There's now a warning for that but I'm wondering if we haven't covered this particular case yet :thinking:

The resource is shared across all users. It's the only type of resource accepted in Workflows.

It's officially not working in mobile app as well (when used in queries). So this might be a Custom Auth problem once it is shared with all users. I checked the variables and it is stored properly. @Kabirdas

Any ideas on your team on how to solve this?

Does the behavior change at all after manually re-authenticating the resource instead of using the refresh workflow?

Also, for more context, is it working in regular apps?