![]() ![]() I've tried adding the /google_auth to the url endpoint, and even tried the step-by-step guide you posted last (it's possible I didn't create the dictionary in the correct format) and still no JSON response. Upon further inspection, it looks like it's because I'm not getting back a JSON after all, but rather the HTML for some additional sign-in page via CloudFlare. The response object is giving me a 200 response code, but when I try to access the JSON with response.json() I'm getting thrown a decode error. I believe the element that changes is the “cookie” in the Request out of curiosity, is there an updated / more streamlined way to getting the id token / session ID through the google auth route? I've been trying to debug this for the past couple hours, and have stumbled upon this thread, which seems to be the same issue I'm having.įor some more context, I'm simply following the guide on how to access the Metabase API with Python and I'm already hitting a roadblock after step 1: response = requests.post(url='/api/session', The elements you copy and paste into your api call will eventually stop working, and you will have to repeat this process. IMPORTANT : Keep in mind, that OAuth is meant to expire after a while (could be minutes, could a one or two days). NOTE: I personally did not have to include a payload in this particular API call The Response from the API call will include an element called “id_token”.Under “Headers” you will see several sectionsĪ.) General - Copy the Request URL from this sectionī.) Request Headers - Copy all of the elements from this sectionĪ.) URL = Request URL from the General sectionī.) Headers = Elements from the Request Headers section (if using Python, create and use dictionary of these items).Look for a request in the Network tab that starts with “iframerpc?action”.Log into Metabase using Google Authentication.Click that twice to reset the request tracking. You will see a red record button in the upper left.In the Developer window, go to the Network tab. ![]() Open the Developer window (or right click and select “inspect”). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |