You can use 3 options to access file content:

  1. Use real Bitbucket account (which is not recommended for security reasons)  
  2. Use App passwords (
  3. Use OAuth token (

Only permission required for OAuth customer or App password is Repository Read

App passwords and regular credentials should be entered in user/password fields (Username is the actual user name in both cases).

OAuth token should go to the Token field (and other fields should left blank)

How to get an Oauth token

  1. Create OAuth customer on Bitbucket settings page
  2. Open{key}&response_type=token (replace {key} with the key generated on step #1)
  3. Once you get re-directed grab access_token parameter from browser address bar and replace trailing %3D with =
  4. Use access token on Host Credentials screen on your Confluence.

You may need to renew the access token eventually.

URL to use

Unfortunately, raw links  (which are provided in the user interface)  don't work correctly with OAuth and App passwords (as of April 2019).

You should use links to :<owner>/<repo-key>/src/<commit-or-branch>/<path-to-file>

Example is: