401 Invalid API Token error only during scheduled runs (Custom App – EU1)

:bullseye: What is your goal?

We are testing our custom app in the External Developers EU1 organization and want the scenario to run successfully both manually and on a scheduled trigger (every 15 minutes) using the same connection.

:thinking: What is the problem & what have you tried?

We are experiencing an issue where the scenario runs successfully when executed manually, but when scheduled to run automatically every 15 minutes, it consistently fails with the error “[401] Invalid API Token, please generate new token.” This occurs even though the same connection and API token are being used, and no changes are made to the module or connection configuration between manual and scheduled runs. To troubleshoot, we reconnected the existing connection, regenerated the API token, and also created a completely new connection to test again. In all cases, manual execution works immediately after setup, but the scheduled execution continues to fail with the same 401 error. This behaviour appears to occur only during automated runs.

:clipboard: Error messages or input/output bundles

[401] Invalid API Token, please generate new token

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

401 on scheduled but not manual = your custom app OAuth refresh logic isn’t triggering. The connection works initially but doesnt auto refresh when the access token expires. This is fixable in your app’s connection configuration. DMing you the specific fix

Thanks for the suggestion regarding the OAuth refresh logic. We’ve reviewed our connection configuration, but the issue is still persisting — manual runs work, while scheduled runs fail with 401.

Could anyone please help with more specific guidance on what to check in the refresh setup?

Some creative troubleshooting is needed here. Try to use https://webhook.site as an URL and do not sanitize anything. You should be able to see both the incoming request in webhook.site as the outgoing request in the Make DevTool (Chrome Extension: Make DevTool - Chrome Web Store) what is sent an received.

Because of your previous messages and the migration, I sense that something else could be at the core of the problem though…

Thanks for the suggestion. I’ll try routing the request through webhook.site and inspect both the incoming request there and the outgoing request using the Make DevTool extension to see what is actually being sent during scheduled execution.

One important observation from our testing is that this issue seems to be isolated to a newly created module in our custom app. The same OAuth2 connection is used by seven other modules in the same app, and those modules work correctly in both manual and scheduled runs. However, this specific module only fails with a 401 error during scheduled execution while manual execution works without any issue.

Because of this, it appears that authentication is generally working, but something may be behaving differently for this particular module during automated runs. I’ll run the webhook.site test you suggested and share the results here if it reveals anything useful.

Thanks again for the direction.

I hope the troubleshooting with webhook.site will give some clarity. But otherwise you should escalate this through Make support. I think there might be a technical issue.