Public-client Device Code Flow ; support for empty OAuth scopes

Hello Twitch Developer Support,

I’m developing a Twitch-integrated application using a registered Public client and the Device Code Grant Flow.

I need to resolve Twitch usernames to numeric user IDs through the Helix Get Users endpoint. The API documentation indicates that this lookup does not require additional OAuth scopes.

However, the Device Code Flow documentation marks the scopes parameter as required, without explicitly confirming whether an empty value is supported.

Could you clarify:

  1. Does the Public-client Device Code Flow accept an explicitly empty scopes parameter (scopes=) during device authorization?

  2. Must the same empty parameter be supplied during token exchange, and is it accepted?

  3. If successful, will the issued user access token validate with an empty scopes array?

  4. Can that zero-scope user token be used with Helix Get Users to resolve login names to numeric user IDs?

I want to avoid requesting permissions that the application does not need.

Yes, per RFC specification for DCF but also note note it should be scope per RFC specification for DCF and GH:1130

Technically a scope field here does nothing as not required to be specified anyway. See GH:1130 / and RFC specification for DCF, (so documentation fault).

Yes, of course, the validate endpoint, reports the scopes on the token being checked. It won’t lie

Yes, this endpoint returns the user in the token. Regardless of scopes on present or not on the token.

See also

Hi @BarryCarlyon Thank you for the detailed explanation and for testing the empty-scope case.

I reviewed RFC 8628 and Twitch developer issue #1130. I understand that scope (singular) is the standard parameter name and that the scope parameter is unnecessary during token exchange.

Could you alsoo confirm the exact form parameters used in your successful zero-scope test?

  1. For POST /oauth2/device, did you send scope= (an explicitly empty value), or omit the scope parameter entirely?

  2. For POST /oauth2/token, did you omit both scope and scopes?

  3. Did GET /oauth2/validate return an empty scopes array for the resulting token?

I’m asking specifically to implement the correct request encoding for a registered Public Twitch client without requesting unnecessary permissions.

I linked you a code example that answers these questions and demonstrates a working flow, built off the linked RFC for compliance with the RFC.

That code example can be downloaded and run yourself just needs a clientID dropped into it. and/or the scopes changed to a blank array as I noted earlier