Get Bearer token for Sustainability APIs in Postman and/or Python
I'm working on Microsoft Cloud for Sustainability REST APIs. Each of these APIs require a bearer token for authorization except the Metadata API.
For example, I made a GET request on Emissions By Enrollment API and I have my primary and secondary keys (subscription keys) with me. Now, I'm unable to find a way to get a bearer token from these subscription keys. I have tried passing the subscription key in the header, but that did not work as I get this - "401 unauthorized" error. In the response header I am seeing that the Bearer token is required for authorization.
I need a way to get bearer for these sustainability APIs using the subscription keys or any other better way of getting the data from these APIs from Postman and/or Python.
Please help me. Thanks in advance.
Issue
References: