Bitbucket forge implementation

Feature: Get Current logged in user’s Commits and Pull Requests

Didnt find any example app or documentation to use bitbucket rest APIs in the forge app.

Providers can help but not sure how to implement it with bitbucket API. Please provide a sample app link if created.

1 Like

Hi @SandeepK1 ,
Welcome to the community :smiley:
Here is an example of dealing with external provider in manifest:

permissions:
  scopes:
    - read:jira-work
    - read:issue:jira
  external:
    fetch:
      backend:
        - https://login.microsoftonline.com
        - https://graph.microsoft.com
    images:
      - cdn.cdnlogo.com
providers:
  auth:
    - key: microsoft-dfgdfg
      name: Microsoft
      type: oauth2
      clientId: bc49c471-a6cb-4f64-aef2-2aca10637a7d
      bearerMethod: authorization-header
      scopes:
        - openid
        - profile
        - offline_access
        - Notes.Create
        - Notes.Read
        - Notes.ReadWrite.All
        - Notes.ReadWrite.CreatedByApp
      remotes:
        - microsoft-graph
      actions:
        authorization:
          remote: microsoft-auth
          path: /common/oauth2/v2.0/authorize
          queryParameters: { response_mode: 'query' }
        exchange:
          remote: microsoft-auth
          path: /common/oauth2/v2.0/token
          resolvers:
            {
              accessToken: 'access_token',
              accessTokenExpires: 'expires_in',
              refreshToken: 'refresh_token',
            }
        revokeToken:
          remote: microsoft-auth
          path: /common/oauth2/v2.0/revokeToken
        retrieveProfile:
          remote: microsoft-graph
          path: /v1.0/me
          resolvers: { displayName: 'displayName', id: 'id' }
remotes:
  - key: microsoft-auth
    baseUrl: https://login.microsoftonline.com
  - key: microsoft-graph
    baseUrl: https://graph.microsoft.com

I hope this will help :slight_smile:

Regards
Magdalena Lidia Rogulska

1 Like

You can’t use Atlassian as an oauth Provider in Forge for some reason - see Forge External Oauth2 doesn't support Atlassian Oauth?

3 Likes