I can't connect sandbox Ads via API (Forbidden https://login.windows-ppe.net/)

Zorion 10 Reputation points
2025-05-19T12:29:23.8866667+00:00

Until last Friday I was able to access my Sandbox MsAds account via API (in python).

Now it fails because I need to refresh the credentials and I can't access the login page (it returns a 403 Forbidden):

The Python library gives me this URL:

https://login.windows-ppe.net/consumers/oauth2/v2.0/authorize?client_id=...&scope=https://api.ads.microsoft.com/msads.manage%20offline_access&response_type=code&redirect_uri=....&prompt=login

It gives me a direct error 403, so I can't continue. Should I change something?

I'm using the following library:

Name: bingads
Version: 13.0.14

Thanks in advance!

EDIT: For your information. We think that windows-ppe has been deprecated so we updated the library and tried to use an "outlook" account (instead of an "outlook-int" account), but we still haven't managed to authenticate properly (see replies to Julian Selser's comments).

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
485 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Julian Selser 15 Reputation points
    2025-05-20T16:52:08.1266667+00:00

    Im in the same boat since last week...

    1 person found this answer helpful.

Your answer

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