Hello,
I tried the python snippet below however, it returned 'This endpoint does not support token-based authentication'.
import json
import requests
access_token = "sample_token"
workspace = "sample_workspace"
repo_name = "sample_repo"
url = f"https://api.bitbucket.org/internal/repositories/{workspace}/{repo_name}/access-tokens"
headers = { "Accept": "application/json", "Content-Type": "application/json", "Authorization": f"Bearer {access_token}" }
payload = json.dumps({ "name": "Test2", "scopes": ["webhook", "pipeline", "pipeline:write", "pipeline:variable", "runner:write"] })
response = requests.request( "POST", url, data=payload, headers=headers )
My general intention is for automation. I would like to avoid doing manual work for setting-up a bitbucket pipeline workflow where in the process it will trigger another pipeline on another repo from a particular bitbucket pipeline using `pipe: atlassian/trigger-pipeline` where the authorization that will be used is `BITBUCKET_ACCESS_TOKEN`.
Regards,