Python Requests syntax for getting a resource token.
Jason Mariquina
Member Posts: 1
in API Gateway
Situation
I have been able to access the api's via Postman. However, when using the Requests package, I am getting a 403 error. I suspect my syntax is incorrect.
Code Used
# Get an access token
token_url = pu +ot
token data= {
"grant_type": "password",
"username": saak,
"password":sask
}
header={"Content-Type":"application/json"}
token_response = requests.get(token_url, headers=header, json=token_data)
0