Skip to content

Commit

Permalink
using v1 API to get user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
liskaj committed Sep 26, 2023
1 parent 26c57bc commit b88e9c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions login.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export function setTokenStorage() {

// look up the profile image for this user's Autodesk ID and put in the specified <div> in the DOM
export async function loadUserProfileImg(div) {
const res = await fetch(`https://api.userprofile.autodesk.com/userinfo`, {
headers : { "Authorization":`Bearer ${window.sessionStorage.token}` },
const res = await fetch( `${env.forgeHost}/userprofile/v1/users/@me`, {
headers : { "Authorization":`Bearer ${window.sessionStorage.token}`}
});
const user = await res.json();
getElem(div).src = user.picture;
getElem(div).src = user.profileImages.sizeX40;
}

0 comments on commit b88e9c5

Please sign in to comment.