1
2
3
4
5
6
7
8
9
10
11
12
13
14
export async function getAccessToken(id, secret) {
const params = new URLSearchParams();
params.append("client_secret", secret);
params.append("grant_type", "client_credentials");
params.append("scope", "openid,AdobeID,read_organizations");
let resp = await fetch(`https://ims-na1.adobelogin.com/ims/token/v2?client_id=${id}`, {
method: "POST",
body: params,
});
let data = await resp.json();
return data.access_token;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023