Trying generic oauth with bitbucket

Trying to use generic oauth with bitbucket but getting the following error,

Confirm access to your account
Invalid redirect_uri

This integration is misconfigured. Contact the vendor for assistance.

Grafana version: 9.4.7

I followed the documentation Configure generic OAuth authentication | Grafana documentation and configured the callback url as mentioned there, like https://myCustomDomain/login/generic_oauth, but still facing the same issue

My oauth configuration:

auth.generic_oauth:
    name: BitBucket
    enabled: true
    allow_sign_up: true
    auto_login: false
    client_id:  <key>
    client_secret: <secret>
    scopes: account email
    auth_url: `https://bitbucket.org/site/oauth2/authorize`
    token_url: `https://bitbucket.org/site/oauth2/access_token`
    api_url: `https://api.bitbucket.org/2.0/user`
    teams_url: `https://api.bitbucket.org/2.0/user/permissions/workspaces`
    team_ids_attribute_path: values[*].workspace.slug
    team_ids:
    allowed_organizations:

Requesting assistance from individuals/teams who have encountered a similar issue and successfully resolved it. Any help provided would be greatly appreciated.