Code 401 from calling confluence REST APIs

Hello, I have problem with calling REST API through api.requestConfluence(route (address)).
It used to be fine but suddenly it returns 401 everytime.

I did some research and found that there was some update regarding calling API. here but I do not see how it would possibly affect me.

Here is code snippet that calls the API which has been returning 401.

let address = `/wiki/api/v2/pages/${contentId}/properties?limit=250`;
    let properties = [];
    while(true){
      const response = await api.asApp().requestConfluence(route(address), {
        headers: {
          'Accept': 'application/json'
        }
      });

There is more code below but its irrelevant.
I am wondering which part of this address is causing problem?

Thanks

Hello @JunheokCheon

If you recently updated to the latest version of Forge, then refer to this very recent thread where others have had the same issue. You’ll find the cause and solution is described towards the end of the thread.

1 Like