[Python] AWS Glue - Error in Python Script - invalid request expects grant_type

Discussão em 'Python' iniciado por Stack, Março 5, 2025.

  1. Stack

    Stack Membro Participativo

    I am using below code to get the Oauth token, and I get below error. Tried using data,params,json inside get() but still no luck. Need some help here please.

    headers = {"Content-Type":"application/json"} payload = {'grant_type':'client_credentials', 'client_id':'YYYYYYYY', 'scope':'ZZZZZZZZZ', 'client_secret':'XXXX' } response = requests.get(api_url, headers=headers, json=payload)

    Error response: The request body must contain the following parameter: 'grant_type'.

    Continue reading...

Compartilhe esta Página