Re: Can't insert a post with v3 API and ServiceAccountCredential with .net

Michele Lepri <[email protected]>
Newsgroups gmane.comp.web.blogger.api
Message-ID <CAOK5S=ZvMhgJOr8qoW4U+aXz5BLfMsV+RywBKp-wtb7S+BVi0w@mail.gmail.com>
Thanks for the reply.

Ouch..! I will find a workaround or go back to api v2 =)

thanks
michele



2014-08-04 4:52 GMT+02:00 'Brett Morgan' via Blogger Developer Group <
[email protected]>:

> 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.
>



-- 
http://michelelepri.blogspot.com/

-- 
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.