0

I require the ability to create new email addresses frequently, however I'm prompted with the verify your account window, when signing in to the gmail account. This is a hindrance to what I'm trying to achieve. Is there a way to bypass this window, so users can access there email straight away.

I'm creating email accounts via the API and I'm setting the suspended property = false.

However, it's not acknowledging this when posting to the API and it's setting the suspended property = true and it sets suspensionReason=WEB_LOGIN_REQUIRED?

This is what I'm trying to insert.

    UsersResource.InsertRequest newUser = Service.Users.Insert(new User
        {
            PrimaryEmail = user.PrimaryEmail,

            Name = new UserName()
            {
                FamilyName = user.FamilyName,
                FullName = user.FirstName,
                GivenName = user.GivenName
            },

            Password = user.Password,
            Suspended = false,
            SuspensionReason = String.Empty,
            IsAdmin = true,
            IsMailboxSetup = true,
            AgreedToTerms = true,
            IsDelegatedAdmin = true
        });

HttpPost on the left HttpResponse on the right

Any help would be great.

Tom Lee
  • 11
  • 1
  • 2
  • Are you aware that [Users.insert](https://developers.google.com/admin-sdk/directory/v1/reference/users/insert) requires authorization? – ReyAnthonyRenacia Jan 04 '18 at 09:16
  • Yes, this is just the snippet of code in the create user, I inject the authorisation credentials, and provide the following scope - DirectoryService.Scope.AdminDirectoryUser – Tom Lee Jan 05 '18 at 15:34

0 Answers0