Re: Can't insert a post with v3 API and ServiceAccountCredential with .net
"'Brett Morgan' via Blogger Developer Group" <[email protected]>
| Newsgroups | gmane.comp.web.blogger.api |
|---|---|
| Message-ID | <CAAFdGSdvyA=PvNH_5-_y8bhH9OhoOuLLAQRDqod=AU4RgVDO=Q@mail.gmail.com> |
I don't believe service accounts and Blogger API v3 get on. Sorry about that. On Sat, Aug 2, 2014 at 9:21 PM, Michele Lepri <[email protected]> wrote: > Hi all, > as subject, I have problem inserting posts. > > > - My account permissions are fine (I have tested multiple account) > - I think to set the code for the authentication in the right way > (followed > https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth > example); > > Here some of my code: > > //Service creation > var certificate = new X509Certificate2(@"key.p12", "notasecret", > X509KeyStorageFlags.Exportable); > var credential = new ServiceAccountCredential( > new > ServiceAccountCredential.Initializer(BloggerConst.CLIENT_MAIL) > { > Scopes = new[] { BloggerService.Scope.Blogger, }, > }.FromCertificate(certificate)); > var serv = new BloggerService(new BaseClientService.Initializer() > { > HttpClientInitializer = credential, > }); > > //post creation and insert > > var newPost = new Post() > { > Title = "test", > Content = "test", > }; > var postInsertRequest = new PostsResource.InsertRequest(serv, > newPost, task.BlogId); > post = postInsertRequest.Execute(); > > Anyone have similar issues? > > Thanks > > michele > > -- > You received this message because you are subscribed to the Google Groups > "Blogger Developer Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/bloggerdev. > For more options, visit https://groups.google.com/d/optout. > -- Brett Morgan | Developer Relations Engineer, Google Maps | [email protected] | profiles.google.com/brettmorgan -- You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/bloggerdev. For more options, visit https://groups.google.com/d/optout.