Hi Community,
Due to GDPR it’s not advisable to store user details it’s advisable to store account id and query user details when needed. I am trying to implement the same .
I am able to query current user whenever required calling myself user API. But I also need to fetch user details of some other users whose account Id I have stored in my local database.
Below is the code I am using to do so on the server side in my nodejs app
let user_url = "/rest/api/3/user/?accountId=" + account_id;
let httpClient = addon.httpClient(req);
httpClient.get(
{
url: user_url,
contentType: "application/json",
json: true,
},
(error, response, body) => {
console.log(body);
res.end(JSON.stringify(body));
}
);
I am getting response as "Specified user does not exist or you do not have required permissions"
Can someone guide me on rightway to do this ? How are others doing this ?