for JIRA cloud REST API access
you can create API token from your personal Atlassian account page:
there are 2 types of API tokens:

BUT Based on the options you need to use different URLs to access your JIRA REST API:
https://mysite.atlassian.net/rest/api/3/search/jqlhttps://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/search/jql
https://api.atlassian.com/ex/jira/123..../rest/api/3/search/jql?jql=project+%3D+XXXDocumentation is not very intuitive
JIRA cloud Basic auth for REST APIs:
Manage API tokens for your Atlassian account:
Explanation of API token scopes limits (ignore the info about Oauth2.0 and Forge apps):