Need help with confluence cloud rest api authentication

I’m getting the following
HTTP Status 401 - Basic Authentication Failure - Reason : AUTHENTICATED_FAILED

for the following curl command

curl -u admin:<mypassword. -X GET “https://.atlassian.net/wiki/rest/api/content?title=testpage123”

Any ideas why I’m not authenticating?

The issue was I was using my admin credentials. You need to create another set of credentials and authenticate using those.