Ahh thanks Phil, I asked chat GPT which gave me hope here, this is what it recommended
---------------------
// Get the LMS API object
var lmsAPI = parent.GetAPI();
// Check if the LMS API is available
if (lmsAPI) {
// Get the current user's ID
var userID = lmsAPI.GetStudentID();
// Use the user ID to retrieve the profile photo URL
var profilePhotoURL = getProfilePhotoURL(userID);
// Update the profile photo in the Storyline content
updateProfilePhoto(profilePhotoURL);
} else {
console.error("LMS API is not available.");
}
// Function to retrieve the profile photo URL for the given user ID
function getProfilePhotoURL(userID) {
// Add your code here to retrieve the profile photo URL from the LMS for the given user ID
// Example:
// return "https://example.com/profile-photos/" + userID + ".jpg";
return "";
}
// Function to update the profile photo in the Storyline content
function updateProfilePhoto(profilePhotoURL) {
// Add your code here to update the profile photo in the Storyline content
// Example:
// document.getElementById("profile-photo").src = profilePhotoURL;
}
----------------
If anyone else or even I do get a working version going I'll add to this thread.