We manage private teaching-material repositories in the <span>nvidia-dli</span> Bitbucket Cloud workspace. The <span>teachingkits</span> group has read access to six private repositories, and our prior process was to add a list of users from a text file to that group via a script.
Our old script used this legacy endpoint with an app password:
<span>PUT <a href="https://api.bitbucket.org/1.0/users/nvidia-dli/invitations" target="_blank" rel="nofollow noopener noreferrer">https://api.bitbucket.org/1.0/users/nvidia-dli/invitations</a></span>
with:
<span>{"email":"user@example.com","group_slug":"teachingkits"}</span>After moving to a scoped Bitbucket API token (<span>admin:repository:bitbucket</span> and <span>admin:workspace:bitbucket</span>), the endpoint returns HTTP 403. We also tested both Basic and Bearer authentication.
I found BCLOUD-24073, which states that the legacy <span>/1.0/invitations</span> endpoint does not support API-token authentication.
Is there a supported, scriptable replacement for bulk-inviting email addresses to a Bitbucket group or private repositories? If not, is there a migration path or workaround planned for Bitbucket Cloud Free workspaces?
We need to keep the repositories private; manually adding each user to the group is our current workaround.