API data calls for plugins with oauth2 user-agent flow aren't getting called

I have a custom plugin, with an API with oauth2 user-agent flow authentication method.
This API has a data call, which successfully retrieves data when I click “initialize call” button in the plugin editor.
However, when I add an element to the page that uses this API’s result as data, the endpoint isn’t getting called. This happens for both authenticated and unauthenticated users.

The moment I turn off authentication or switch to private key in header/URL, the data API endpoint gets called.

The behaviour is slighlty different if I use API connector plugin instead.
Here the API end does get called, but only when a user is logged in, whereas with custom plugin, the fact that user is logged makes no difference.

Did you use sign the user with social network action?
You cannot call an oAuth2 WF with unauthenticated user, and the user need to connect is own account using social network action.

If you want to just use your own account in the API Provider, you should choose (if available) a different authentcation method.

If you share API doc, we can probably help you :wink: