.net - Create users alias in Google API (using c#) -


this error getting when creating alias in google admin directory email address.

google.apis.requests.requesterror entity exists. [409] errors [ message[entity exists.] location[ - ] reason[duplicate] domain[global] ] 

this code :

i want create alias email id : test@test.com

added id above : aliasemailid@test.com ===> test@test.com

var aliasesreq = service.users.aliases.insert(new google.apis.admin.directory.directory_v1.data.alias                       {                       aliasvalue = "aliasemailid@test.com",                    }, "test@test.com"); 

how ? kindly help

i don't have admin account cant test this. checking documentation on users.aliases looks think going this.

 string userkey = "test@test.com";  var body = new google.apis.admin.directory.directory_v1.data.alias { primaryemail = userkey, aliasvalue = "aliasemailid@test.com" };  service.users.aliases.insert(body, userkey).execute(); 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -