Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:59:36+00:00 2026-06-17T12:59:36+00:00

I am working on an app that allows user to share their Drive files

  • 0

I am working on an app that allows user to share their Drive files to friends. But there is a problem of Google App Account, like someone@somadomain.com, of which files cannot be shared with people who are not under that domain. Although the share policy can be changed by admin of somedomain.com, but I prefer not allowing people use my app with Google Apps Account.

I also check this post: How to determine if the account is a Google apps account?. But I don’t agree with the idea of checking domain to detect account type. Because people can register Google Account with any email address. I just registered one with my Hotmail, someone@hotmail.com, which has no domain restriction when sharing a file.

Can anyone help with this? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:59:38+00:00Added an answer on June 17, 2026 at 12:59 pm

    Assuming you included:

    https://www.googleapis.com/auth/userinfo.email
    

    in your OAuth scopes, you can make a request to:

    https://www.googleapis.com/oauth2/v2/userinfo
    

    If it’s a Google Apps account, an “hd” parameter (Hosted Domain?) will be returned by the call with the Google Apps domain as it’s value. If it’s a consumer account, whether it’s @gmail.com or even a potential “conflicting account”, the hd parameter will not be returned. See my example below. admin@jay.powerposters.org is a Google Apps Account while consumer@jay.powerposters.org is a consumer account. If I created a consumer user in the Google Apps domain it wouuld become a conflicting account and the consumer account would be pushed out of the @jay.powerposters.org namespace but that hasn’t happened yet.

    For admin@jay.powerposters.org:

    GET https://www.googleapis.com/oauth2/v2/userinfo
    
    HTTP/1.1 200 OK
    Content-length: 99
    X-xss-protection: 1; mode=block
    ...
    
    {
     "email": "admin@jay.powerposters.org",
     "verified_email": true,
     "hd": "jay.powerposters.org"
    }
    

    For consumer@jay.powerposters.org:

    GET https://www.googleapis.com/oauth2/v2/userinfo
    
    HTTP/1.1 200 OK
    Content-length: 71
    X-xss-protection: 1; mode=block
    
    {
     "email": "consumer@jay.powerposters.org",
     "verified_email": true
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on an app that allows the user to draw pixelated images
The app that I'm working on allows the user to pick an image from
My app allows a user to edit data, but during save there are two
I'm working on an app that allows the user to create notes while rehearsing
I am working on a web app that allows user to edit specific HTML
I'm working on an app that allows image capture, but not video capture, but
I finished a working app that allows my user to login with Facebook then
I am working on an Android mapping app that allows a user to type
I'm working on an app that allows the user to start a phone call
I'm working on an iOS app that allows the user to like a Facebook

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.