Error 403 when retrieving data from custom reports

I am trying to retrieve data from custom reports, but I’m unable to pinpoint the reason why. Any tips or suggestions?

Hi @mccrindle Thanks for reaching out! I’m sorry you’re having trouble with this. Can you tell me more about what is occurring, and how you’re pulling that data? Are you pulling the data through an API call/integration like PowerBi, or directly in our custom reporting feature? Can you share what specific data points or calls you’re using? I’ll keep an eye out for your reply so I can share a better suggestion to help you take a closer look.

Hi @alibby

Thank you for your response. I am attempting to retrieve data from an API using Python for internal purposes. After reviewing the API documentation, I didn’t find any comparable code, so we attempted to make calls using Python’s request library for the API. However, we received a 404 error on some occasions and a 403 error on others, indicating that the URL and API key are functional but restricted.

Our goal is to obtain custom report data and integrate it into our ‘master-list’, which is compiled from various sources of our Active Campaign custom reports.

Thanks for letting me know! That is really helpful. Typically, you would only get a 404 response if you tried to pull data that did not exist, like tags for a contact that did not exist. If you’re seeing that for data points in your account, we would want to help you review the call and response you’re sending/receiving in depth so we can assist you in troubleshooting it directly.
Similarly, a 403 error should be related to user permissions - for example, if a user’s API key is used to call data that they don’t have access to, like a list that is not visible for them, as they are not specifically able to pull the data they can’t access directly. That type of error might be resolved by using the key of a main admin user, or checking the user permissions for the user whose key is being utilized. If none of that resolves your issue, I’d recommend reaching out to us directly so we can help review the full call you’re making, response, and the associated user in order to better help you address this directly.