How to access bitbucket using app password
<p>I have created an app password as explained <a href="https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html" rel="noreferrer">here</a></p>
<p>But now, how do I access the repository using this app password?<br>What will be the url?<br>Can someone direct me to a page showing an example please?</p>
<p>The below is a code for github. How do I do it for bitbucket?</p>
<pre><code>var githubToken = &quot;[token]&quot;;
var url = &quot;https://github.com/[username]/[repository]/archive/[sha1|tag].zip&quot;;
var path = @&quot;[local path]&quot;;


using (var client = new System.Net.Http.HttpClient())
{
    var credentials = string.Format(System.Globalization.CultureInfo.InvariantCulture, &quot;{0}:&quot;, githubToken);
    credentials = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(credentials));
    client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(&quot;Basic&quot;, credentials);
    var contents = client.GetByteArrayAsync(url).Result;
    System.IO.File.WriteAllBytes(path, contents);
}
</code></pre>
<h2>Update</h2>
<p>Go to <strong>Personal Settings</strong> and then <strong><a href="https://bitbucket.org/account/settings/app-passwords/" rel="noreferrer">App Passwords</a></strong> as shown below.</p>
<p><a href="https://i.stack.imgur.com/Situv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Situv.png" alt="Create Bitbucket App Password" /></a></p>