Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

IP whitelisting - UI works but API fails

Vishal Paike May 12, 2022

Hi All,

I am facing very weird issue with respect to IP whitelisting.

I have whitelisted my ip bitbucket cloud settings(workspace -> access control). Now, my bitbucket UI works fine however when I try to fetch any data with bitbucket cloud apis like - https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/pullrequests?state=DECLINED&pagelen=2 - API responds - {"type": "error", "error": {"message": "To access this repository, an admin must whitelist your IP."}}

 

Is this a known bug? Or am I missing something?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2022

Hi Vishal,

  • Are you running these API calls from the same machine where you access Bitbucket from browser?
  • Are you running the API calls from terminal with curl, or are you using an API client?

If you are using curl to run API calls from a terminal application, I would suggest running

curl ipinfo.io

and seeing what IP this command returns.

If you're using an API client, you can run a GET request to ipinfo.io and check what IP this call returns.

Is the IP you get the same one you whitelisted and do you see it listed in

https://bitbucket.org/{your-workspace-id}/workspace/settings/access-controls

(replace {your-workspace-id} with the id of your workspace)

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events