Partly I've answered this myself. If I use a super admins login instead of
the actual user which I want to receive the signature for I can do it. So:
GmailSettingsService service = new
GmailSettingsService("emailsettings-or-any-name", domain,
[superadminslogin], [password for super admin]);
String sign = service.retrieveSignature ( some other users complete email
address );
So than I guess the question would be different. Do you need to be super
admin to be able to login with this api or can I add some specific rights
to make it work?
Best regards
Nils
Den onsdagen den 15:e augusti 2012 kl. 10:32:42 UTC+2 skrev nkm:
>
>
> I'm using gdata 1.0 core libs and the class GmailSettingsService to
> retrieve an email signature. This works perfectly fine with my own
> credentials (I'm an admin on the domain). But with any other user I get the
> error message "You are not authorized to access this API" (complete error
> in the end of this email) . We have a google apps for business
> subscription. I thought the problem was to "Enable provsioning API" (under
> domain setttings->user setting). But it didn't make a difference. I've also
> created a new role with access to provisioning API and added the user there
> but it didn't make a difference. I've also waited now about 20 hours so I
> think it's no delay problem either.
>
> My code:
>
> GmailSettingsService service = new
> GmailSettingsService("emailsettings-or-any-name", domain, userName, login);
> String sign = service.retrieveSignature(user.getEMailUser());
>
> I hope someone can help me with this problem.
>
> Nils
>
> The complete error message:
>
> Error message: com.google.gdata.util.ServiceForbiddenException: You are
> not authorized to access this API
> <HTML>
> <HEAD>
> <TITLE>You are not authorized to access this API</TITLE>
> </HEAD>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> <H1>You are not authorized to access this API</H1>
> <H2>Error 403</H2>
> </BODY>
> </HTML>
> [13]
> com.google.gdata.util.ServiceForbiddenException: You are not authorized to
> access this API
> <HTML>
> <HEAD>
> <TITLE>You are not authorized to access this API</TITLE>
> </HEAD>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> <H1>You are not authorized to access this API</H1>
> <H2>Error 403</H2>
> </BODY>
> </HTML>
>
> at
> com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:605)
> at
> com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
> at
> com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
> at
> com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
> at
> com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
> at com.google.gdata.client.Service.getEntry(Service.java:1352)
> at com.google.gdata.client.GoogleService.getEntry(GoogleService.java:581)
> at com.google.gdata.client.Service.getEntry(Service.java:1278)
> at
> com.google.gdata.client.appsforyourdomain.AppsForYourDomainService.getEntry(AppsForYourDomainService.java:118)
> at
> com.google.GmailSettingsService.retrieveSettingsEntry(GmailSettingsService.java:104)
> at
> com.google.GmailSettingsService.retrieveSignature(GmailSettingsService.java:697)
>
--
You received this message because you are subscribed to the Google Groups
"Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-apps-mgmt-apis/-/YPiaFsHBpWIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-apps-mgmt-apis?hl=en.