How to request user:email scope with GitHub Apps?

Hi there,

I’m developing a GitHub App that requires User-to-server requests.

As well as OAuth Apps, GitHub Apps can identify users via almost same its flow, but it cannot be set scope parameter. Therefore I cannot get emails of users because listing user emails requires user:email  scope.
This API is not listed in User-to-server requests supported endpoints.

Does GitHub have a roadmap to support to set a  scope for GitHub Apps?

Or are there any other solutions?

Thanks,

It’s my understanding that GitHub Apps are intended to perform actions on a user’s or organization’s repositories. Even in the case of a user-to-server request, it is still performing actions in relation to the installation’s repositories. So what action on a repository are you attempting to perform that requires the user’s email address?

@lee-dohm wrote:

It’s my understanding that GitHub Apps are intended to perform actions on a user’s or organization’s repositories. Even in the case of a user-to-server request, it is still performing actions in relation to the installation’s repositories. So what action on a repository are you attempting to perform that requires the user’s email address?

Actually, we don’t need user’s email addresses for actions on repositories. However, there are no ways to notify users of errors in our service without their email addresses. Of course, we can notify users via Issues, Pull Requests or other GitHub related UI, but it’s not appropriate for something not related to repositories.

In this case, should we have both GitHub Apps and OAuth Apps? In other words, should a user-to-server request be used for only repository related actions?

1 Like

It is my understanding that user-to-server requests are designed only for repository-related actions, yes.

I understood. Thank you for your replay.