...
Generate an API Token:
Log in to your Jira Cloud account.
Navigate to Account Settings.
Select Security.
Click on Create and manage API tokens.
Generate a new API token and store it securely.
Prepare Your Credentials:
Combine your email address and API token in the format:
Code Block user@example.com:your_api_token
Encode Credentials in Base64:
Use a Base64 encoder to encode the combined string.
For example, in Python:
Code Block language py import base64 credentials = 'user@example.com:your_api_token' encoded_credentials = base64.b64encode(credentials.encode('utf-8')).decode('utf-8')
Include in HTTP Authorization Header:
Add the following header to your API requests:
Code Block Authorization: Basic encoded_credentials Domain: https://<your-domain>.atlassian.net
...