Hi I am getting the following error message "Error setting permissions for repository repo_name 403 - This endpoint does not support token-based authentication" I am not using token based authorization. This is the method in the python script I use:
def set_repository_permissions(username, password, destination_workspace, repo_name, source_repo_permissions):
destination_repo_permissions_url = f"https://api.bitbucket.org/2.0/workspaces/{destination_workspace}/permissions/repositories/{repo_name}"
print(destination_repo_permissions_url)
headers = {
"Content-Type": "application/json",
}
for permission in source_repo_permissions:
response = requests.post(destination_repo_permissions_url, auth=(username,password), json=permission, headers=headers)
if response.status_code != 201:
print(f"Error setting permissions for repository {repo_name}: {response.status_code} - {response.text}")
print(f"Permissions set for repository {repo_name}.")
Is there a reason it returns that particular error message