How do I add Google Directory API user's fullName and email address in a string? - gmail-api

I am working on deploying signatures for new employees after creating their accounts in the Google Admin Console. I've retrieved this sample Python script. https://github.com/jnyada/Learning-Google-Workspace-API/blob/master/signatures.py
Line 25 is where you enter the string to patch the signature into the user's Gmail account. How do I add the user's fullName and email address into that string?
I would also like to set this as the default for new emails and reply/forwards, and activate the setting "Insert signature before quoted text in replies and remove the "--" line that precedes it.". Right now, all this script can do is patch the signature into the account. Is there a function that can activate those settings?
Any help would be much appreciated, thanks.

Related

Disable GMail signature two dashes '--' using GMail API

I'm trying to create a PHP application which will set a user's email signature up automatically. This part works, and I'm able to set signatures for users.
My problem is that I cannot find any option on the SendAs setting which will disable the two dashes inserted before the signature in GMail.
You can disable this option manually in GMail by unticking the box labeled 'Insert this signature before quoted text in replies and remove the "--" line that precedes it'
but there doesn't seem to be any such option in the SendAs resource
Any advice?
Unfortunately there's no Gmail API for
Insert this signature before quoted text in replies and remove the
"--"
option. We hope that Gmail team will take care of our needs :) .

Backand: updating registered user email and name

What is the best method for updating a registered user's email and/or names in Backand? How can I make sure that if I'm changing the email address that I'm not also disconnecting the registered user from their object in the users table (since the server side Update uses the email address to locate the user object in the table)?
I'm using the Backand SDK in my Ionic/AngularJS app.
Thank you for your help. I know it's probably simple but I'm just missing it.
user email is the UserId in Backand, so you can't change it.
It's like you will try to change your email address in gmail, it's impossible.
But you can change firstName and lastName.
To do that go to you app dashboard in backand.com and in enter to "Securtiy & Authorization" > "Registered users", in this tab you can change first and last name of your registered users.

Error adding member to a google api project (developer console)

Here is the documentation for adding a new member to a project—pretty simple.
However, when I add a new member to the project, I get an error:
Error
The specified invitation was not found.
The member I'm adding is an alias account. When I say alias account I mean my main account (username#gmail.com) owns the project, and I'm trying to add a different email that I own (me#mydomain.com). me#mydomain.com is a sub account of username#gmail.com.
When I click the confirmation link, first I have to type in me#mydomain.com's password, then I am redirected to type in username#gmail.com's password, and finally I am redirected to the project where I get the ugly error staring me in the face.
I would be talking with google right now if I could, but I'm a bronze member…
This answer explains that if I want to change the email that displays on the oauth permissions screen, I need to add the email to the project. I'm trying to add the email to the project so I can display me#mydomain.com instead of username#gmail.com on the oauth permissions screen.
Looks like it isn't possible:
Because multiple sign-in is not supported, you will access Google Developers as your default account, username#gmail.com.
It is possible if you don't use sub-accounts! I got it working!
Instead of having me#mydomain.com as a sub-account of username#gmail.com, I had to remove me#mydomain.com from username#gmail.com, then create a new completely separate google account for me#mydomain.com. After doing that, everything was a cinch!

Login page in sencha architect

Am stuck with the login page i followed the steps given in the below link and got almost but not able to login
http://docs.sencha.com/architect/2/#!/guide/views_forms_touch
In my json file i have Name, id, Mobile, etc., so i used Name for username and Mobile for the password, just for a change but am not able to login..
From the above link i found that field name in config is one which is referring(i guessed from the link since its mentioned "Change its name config to username") so i changed username field's name config to Name and password field's name config to Mobile but the result is loginfailed..I think from the code above it should display login is successful if username and password is correct..I just modified a little according to my json file that is Name in place of username and Mobile in place of password, yet the result is same(Login failed)..Am in dilemma what should i refer whether its name or id in config..For source i have posted my json file as text format and my architect folder in the forum http://www.sencha.com/forum/showthre...983#post952983
Can anyone pls check it and tel me..
Thanks in advance!!!!
Your code displays login failed when the request to
http://csi01:888/SenchaService/Sencha.asmx/GetUserList
fails. As the very first step I would test it in the browser and check the inspectors network tab to see what request goes out and what fails there. It seems to me that your problem is not in the sencha code but something on the server side code.

Google App Engine: extract just username from db.UserProperty

I was wondering what is the best way to extract just the username (the portion before # symbol) from db.UserProperty. Perhaps there is a built-in method that i don't know? the nickname method is returning full username.
From the Google appengine code:
A nickname is a human-readable string which uniquely identifies a Google
user, akin to a username. It will be an email address for some users, but
not all.
So it maybe the username or the email depending on the account.
email()
Returns the email address of the user. If you use OpenID, you should not rely on this email address to be correct. Applications should use nickname for displayable names.
There is no built-in method to do that. But can you do something like this
from google.appengine.api import users
user =user=users.get_current_user()
email = user.email()
username = str(email).split('#')[0]

Resources