Cannot display profile photo on member only page
I am using the public API to show the photos of members who have birthdays in a particular month. The page is restricted so that only members can view. I am able to get and display the names and birthdays of members. I am also able to get a link to their profile picture (https://api.wildapricot.org/publicview/v1/accounts/XXXXXX/Pictures/name_of_file.png) however, I am unable to display that photo on the page. It appears as a broken image link and I get an error that says "401 (Invalid credentials. Access to API not allowed.)" I am not sure why this is happening. Does anyone have any clues about why I am getting this error when trying to display a picture to which I have access? I have tried to use the link format from the directory. Directory picture links are as follows: https://myorg.wildapricot.org/Content/Pictures/UserPicture.ashx?memberId=123456&id=1234567890. I am not sure what the second "id" parameter is. Insight into that would be helpful as well.