Cannot create issues using Jira Cloud REST API

I’m trying to automate Jira issue creation using the Jira Cloud REST API (/rest/api/3/issue) with a Python script and my API token, but I’m consistently getting a 401 Unauthorized error with the message ‘You do not have permission to create issues in this project.’"

“I log into Jira via my Google Account (SSO). For API access, I’m using Basic Authentication with my myemail@email.com email and an API token generated from id.atlassian.com/manage-api-tokens.”

“I’ve ensured the API token has the write:jira-work scope (and read:jira-work).”

When I perform a direct curl test, the response headers include x-seraph-loginreason: AUTHENTICATED_FAILED.

Is there anything I’m missing? Please help