Using OAuth2.0 with create issue endpoints

Hey y’all,

We’re using OAuth 2.0 (3L0) for our app, and I’m attempting to call the Create Issue (Bulk) APIs.

Both Create Issue endpoints require non-anonymous access. The API doc examples both use basic auth:

curl --request POST \
  --url 'https://your-domain.atlassian.net/rest/api/3/issue/bulk' \
  --user 'email@example.com:<api_token>' \
...

When I attempt to call the Create APIs using our OAuth2.0 auth (using a Bearer: token, I get this error:

"Anonymous users do not have permission to create issues in this project. Please try logging in first

Seems like we’d need our customers to enable Anonymous Project Access, which can open up a lot more permissions than what we need, and would be unavailable to our free-tier users.

So my question is: how can I call the Create Issue APIs using an OAuth2.0 App? Is there a way to pass user arguments in the API call so it’s not “anonymous”?

This is what our API call looks like, as a cURL:

curl --location --request POST 'https://api.atlassian.com/ex/jira/{cloud-id}/rest/api/3/issue/bulk' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "issueUpdates": [
        {
            "fields": {
                "summary": "issue1",
                "issuetype": {
                    "id": "10006"
                },
                "project": {
                    "id": "10000"
                },
                "description": {
                    "type": "doc",
                    "version": 1,
                    "content": [
                        {
                            "type": "paragraph",
                            "content": [
                                {
                                    "text": "foo",
                                    "type": "text"
                                }
                            ]
                        }
                    ]
                }
            }
        }
    ]
}'