You have the tag of "server" on this question, so I'm going to assume you are using Confluence server (or maybe Data Center?).
See Using Personal Access Tokens for how to generate a Pat for Confluence 7.9+.
If your version of Confluence is <7.9, then you'll need to use basic authentication with base64 encoding.
I don't want to go into too much detail without knowing for sure which version and platform you're using.
Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event