开发者

Not authorized to write to this feed

I am calling

 service.insert(new URL(getContentFeedUrl()), newAttachment);  

for Google sites file upload using MediaStreamSource in servlet and get following exception

com.google.gdata.util.ServiceForbiddenException: OK Not authorized to write to this feed

at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:561)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:543)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:515)
at com.google.gdata.开发者_如何学编程client.media.MediaService.insert(MediaService.java:390)
at morefile.UploadApp.uploadAttachment(UploadApp.java:95)


Do you call service.getAuthToken with good username and password before?


I just realised that i was granting access to user who was not owner of google sites and thus was getting this error. I am leaving this comment as there is little help available on web on this error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜