Share via

APIM & Python requests library issue

Wang Yekindar 0 Reputation points
2025-07-10T02:50:27.26+00:00

Hello team,

I am sending a request to APIM with the Python requests library, but I got a 403 forbidden error. And if I use the User-Agent: "123" or other alternatives instead of the Python requests library's default User-Agent: "python-requests/{version}", I will get a 200 response. Can you explain this issue to me? Thanks

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


1 answer

Sort by: Most helpful
  1. Wang Yekindar 0 Reputation points
    2025-07-29T00:45:26.33+00:00

    Don't Use the Python requests library's User-Agent, It is not safe.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.