Hi! Thanks for the reminder, @ruslan1 .
I had to use "https://api.atlassian.com/ex/jira/[cloud id]" as the domain, and not "https://[company].atlassian.net/api/v1/".
There is more information about getting cloud id here: https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/#implementing-oauth-2-0--3lo-