Hitelesítés
OAuth 2-alkalmazás regisztrációja
Hozzáférési token beszerzése
curl \
--location 'https://surviot.auth.eu-central-1.amazoncognito.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<client_id>' \
--data-urlencode 'client_secret=<client_secret>'const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
const urlencoded = new URLSearchParams();
urlencoded.append("grant_type", "client_credentials");
urlencoded.append("client_id", "<client_id>");
urlencoded.append("client_secret", "<client_secret>");
const requestOptions = {
method: "POST",
headers: myHeaders,
body: urlencoded,
redirect: "follow"
};
fetch("https://surviot.auth.eu-central-1.amazoncognito.com/oauth2/token", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));Alkalmazásengedélyek (scope-ok)
Jogkör
Leírás
A SURVIOT API használata
API dokumentáció
Last updated