Question
Client‑credentials grant yields 401 on user‑scope endpoints
Rahul Byte
0 reputation · 15 Nov 2023, 09:58 UTC
52K views0
The goal is to clarify whether a token obtained via LinkedIn’s client‑credentials grant can be used to call user‑level endpoints such as /me when the request includes a user‑specific scope like r_liteprofile.
The current documentation states that the client‑credentials grant is limited to application‑level scopes, but it does not explicitly say whether requesting a user‑scope results in an immediate token rejection or a token that later fails with a generic 401 error. This ambiguity leaves integrators uncertain about the exact cause of the failure and whether the grant type itself is incompatible with any user‑scope.
Does LinkedIn reject the token request outright when a user‑scope is included in a client‑credentials grant, or does it issue a token that subsequently fails on user‑scope calls? If a token is issued, what error information (if any) is returned to distinguish a scope mismatch from a grant‑type limitation? Which grant type should be used for server‑to‑server integrations that require access to user profile data while still adhering to LinkedIn’s policy?