开发者

Not authorized to write to this feed

开发者 https://www.devze.com 2022-12-11 15:51 出处:网络
I am calling service.insert(new URL(getContentFeedUrl()), newAttachment); for Google sites file upload using MediaStreamSource in servlet and get following exception

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

精彩评论

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