Why does the /userinfo api return a 403 error

Most of the time the api is fine, but sometimes it triggers 403 errors. The following is my request configuration

post : /usersInfo
body: {“emailIds”:[“test1234@xxx.com”]}
header:
auth: eyJ0eXAiOiJKV1Q…

403 return:
{“errors”: [{
“msg”: “You do not have required access privilege to perform this activity.”,
“code”: 403
}]}

Hello @Behmer :smiley:,

Welcome to Kore Community :clap:

Access privilege error indicates that the app used to create JWT token does not have the required permissions of ‘User Management’. For more details check our documentation for UserInfo API

Thank you for stopping by!!

Hi, Thanks for your reply.
Firstly I open permissions of ‘User Management’ in admin api scope. Then generated JWT by java code. I can’t request ‘User Management’ api scope through this jwt, but can using this jwt to request /alluserroles api. why does this happen?

token = JWT.create().withClaim(“appId”, appId).sign(Algorithm.HMAC256(appKey));
appId - Client ID
appKey - Client Secret