As it says here:
https://developer.atlassian.com/cloud/confluence/oauth-2-authorization-code-grants-3lo-for-apps/
This functionality is currently in developer preview. During the developer preview, grants can only be authorized from the developer's account (that is, by the owner of the app).
And more details in this ticket: [ACJIRA-1588] - Ecosystem Jira
But this API doesn’t work for me, see my issue: Confluence API(3LO) returns 404