Amadeus get token api error in JavaScript
Hello, I want to use the getToken Api provided by Amadeus using fetch in JavaScript in a React Native App. What I’am doing is the following:
(LOOK AT THE IMAGE TO SEE THE CODE IM USING)
But I’m getting the following error:
{"code": 38187, "error": "invalid_request", "error_description": "Mandatory grant_type form parameter missing", "title": "Invalid parameters"}
, I know that the AMADEUS_CLIENT_ID, AMADEUS_CLIENT_SECRET and BASE_GENERATE_TOKEN_AMADEUS_URL has the correct value
I don’t understand why I’m getting this error since I passing "grant_type": "client_credentials"
Can anyone please enlighten me with this problem??