Is your API token correct? On the website for the Bing Maps API, there are FAQs and useful documents that will tell you know why the HTTP 400 (Bad Request) REST code shows up.
When I used Mapbox API for something similar, my token would be correct, but then when I output the url that contains my token in my game & copy it into my browser, the link would lead to no where. To an HTTP 401, unauthorized error. It helped me figure out why it was not working, even with my token being valid.
Double check and make sure the link with your API Token that’s being outputted is a functional link, then paste it into your browser. The token could be correct but the link might not be constructed correctly. Basically in my experience, my link had my API token and worked correctly, but in the output, it was being constructed differently due to the scripts I wrote being a bit complex.
I had something like x, y, z for the token, Mapbox style, and my Mapbox username, and it messed up my link when it ran because I formatted the x y z into the url incorrectly. I ultimately managed to correct it by adding a print statement after the final URL, pressing F9 when testing the game, and pasting that link that shows up in the output into my browser. The links kept showing up as HTTP 400 or 401, so I saw the help documents of Mapbox API and there were example links that had my API token, so I can see how I should construct the url in my game.
If the url is working in my browser, it should work in game. However, these are just example links in the help documents. Don’t just copy and paste them into your scripts, it depends what you are grabbing for the link to work. I’m using Mapbox instead of Bing so it is a bit different. I used Mapbox Styles if you are interested in that route.
Bing Maps API Tutorial Documents
Bing Maps API Status Codes, like HTTP 200 & HTTP 400, so you can see if the link is actually working or not.
Go through the help documents and see if there are example links that contain your token. This is how your link is supposed to be constructed.