The Forge Rest API says 401 is an error

When I was doing a Runtime upgrade, I encountered a very strange problem, calling the Rest API prompt: 401.

Is there any way to solve it? I really need a solution right now. Thank you.

The Rest API to call is as follows:

image2025-2-21_14-55-40

The Scope configuration is as follows:

The error results are as follows:

image2025-2-21_15-0-38

You’re doing the call with asUser, so I’d guess the user doesn’t have permission. You could use api.asApp().