Dreamstime

Tuesday 4 August 2015

RavenPlus & OAuth2 - 2 Prerequisites For Blogspot Users

If you blog on Google's Blogger/Blogspot, then read on.

Otherwise - users of Wordpress, for example - you have nothing to worry about. This blog post doesn't apply to you.

The 'Google OAuth2 authentication aware' version of RavenPlus, in which I am currently working on, is built using the Google's Blogger API version 3. As a consequence, to publish your blog post to Blogger/Blogspot with RavenPlus, you will need to do two things:

  • activate the Blogger API (version 3) for yourself; and
  • download the "client_secrets.json" file (in which your "Client ID" and "Client Secret" is stored) to your PC.

Sorry for the hassle, but Google's Terms Of Service doesn't allow me to share my "Client ID" and "Client Secret".

Activating Blogger API

Here are the steps to activate the Blogger API. From the Google Developers Console dashboard. Select or click on:

  1. Create project.

  2. APIs & auth > APIs - activate "Blogger API" (under heading "Social APIs").

  3. APIs & auth > Credentials - create new Client ID (select "Installed Application", the default setting).

  4. APIs & auth > Consent screen - configure "Product Name" (I put mine as "RavenPlus") and "E-Mail address (I put in my Google email address)".

Google will take about 5 days to approve your request. You will receive an email from Google once your request has been approved. In this email, an activation URL (which is valid for 2 days) will be provided. Click on this URL in the email to activate the "Blogger API".

If you were to go back to Google Developer Console, and click on

APIs & auth > APIs > Enabled APIs

you should see the "Blogger API v3" in the list of "Enabled APIs", similar to the picture below.

The List Of Enabled Google APIs - Including Blogger API v3

client_secrets.json

Google's Blogger/Blogspot doesn't use "username" and "password" anymore in the OAuth2 authentication process - but RavenPlus still 'does', so don't removed or alter it in any way in the 'account.xml' file. Instead it now uses tokens.

As part of the authentication process in the upcoming releas of RavenPlus, you will need a file known as 'client_secrets.json', which you can download from Google Developer Console. Select or click on:

  • APIs & auth > Credentials

Click on the "Download JSON" button and store this file with the name "client_secrets.json" in the Raven/RavenPlus data folder - see picture below. I have programmed RavenPlus to look for this file in this directory. Keep this file safe and do not share it with anyone.

"client_secrets.json" file stored in the Raven/RavenPlus's data directory


20 comments:

  1. But where is the link for download the new Raven?

    ReplyDelete
    Replies
    1. Please wait for my blog post. I haven't written it yet.

      Delete
  2. HELP!!!!

    Have I to "sign up for a free trial" in Google Developers for activate Blogger API and download client_secrets.json ???

    ReplyDelete
    Replies
    1. I don't think you need to sign up for the free trial. At least I didn't.

      Delete
  3. Hi T.C.

    I have a very hard problem. When you explain this in the comments section in http://chuahtc.blogspot.com.ar/2015/05/unable-to-access-bloggerblogspot-from.html, I did all step by step, but Google NEVER answer me and I don't have Blogger Api enabled.
    Now what can I do???! I need RAVEN, please, help me!

    ReplyDelete
    Replies
    1. Can you post this problem at the "Blogger Developer Group" forum:

      https://groups.google.com/forum/#!forum/bloggerdev

      If you scroll through the forum you will notice that you are not the only one facing this non-responsiveness from Google.

      Delete
  4. I have the same problem too! I have the json file, but Google don't send me the e-mail ( I wrote June 25)

    I don't understand why I need make this hard steps, 'cause I have a friend with Mac, he use MarsEdit, and when the developers made the update for OAuth 3, my friend only downloaded and installed the soft, without these prerequisites.

    And Windows Live Writer login Blogger without make any other step

    Now how can I use Raven without activate Blogger Api v3???

    ReplyDelete
    Replies
    1. On your problem with the json file, please see my response just above.

      On why these "hard steps", well I am just following the rules set by Google. I am only a volunteer here, sharing my work with the rest of the world. It's just my way of giving back to the Open-Source community after having used Open-Source software for more than 20 years for free all along.

      Delete
    2. Do you want to say that the pay software no need the prerequisites, but the free and Open-Source yes?
      If not is this, I don't understand your answer, 'cause I never installed a soft, (free, Open-Source or pay), where the developer ask me for make some previous steps.

      Like I told you, for example, Mars Edit and W. Live Writer follow the rules set by Google, but not ask for any prerequisites.

      Really you do not tell me why I need make these steps before install a soft.

      I's only curiosity, don't take me wrong. :)

      Delete
    3. The answer that you seek is actually stated in the link that I have provided above:

      http://www.daimto.com/changes-to-the-google-apis-terms-of-service/

      If I may quote a line from that link:

      "Asking developers to make reasonable efforts to keep their private keys private and not embed them in open source projects."

      Raven and Raven+ are open source projects. WLW and Mars Edit are not.

      I could have taken a different route in developing Raven+ in supporting OAuth2 (and keeping my private key private and saving everybody the trouble). But that involves developing an intermediary WebApp that must be installed on an intermediary server somewhere. Problem is: who is going to pay for the PC server and Internet data communication charges?

      Delete
  5. T,C, I don't know you, but I LOVE YOU!!!!! I can't wait for use RAVENPLUS!!!!

    I can't work in my blog without Raven.

    From June I wait everyday for your download link

    THANKS!!!!

    ReplyDelete
  6. When do you think we can download your work?

    Maybe can be this week or the next week? I hope this week! :)

    I live thanks Adsense and I need work in my blog. Without Raven is very hard for me 'cause I reedit old post and upload too much images for post.

    Please answer me, I'm very anxious!!!!

    ReplyDelete
  7. Hi T.C.!

    Do you have any new about Raven? 11 days without news! I am desperate!!!

    ReplyDelete
  8. What's happen' with RavenPlus?
    You don't answer or post anymore, what's happen? You ask for the prerequisites in August 4, but today is 16 and I still waiting for the dowload link
    Do you have a new problem?

    ReplyDelete
  9. Sorry all. I fell ill.

    Also, I have to earn a living like everyone else. I can only work on Raven+ in my spare time. So your patience is required.

    ReplyDelete
  10. Hi TC

    I use RavenPlus with two different Google accounts. How do I deal with this? Is it as simple as applying for the Blogger API with either google account?

    ReplyDelete
    Replies
    1. The answer to your question: Yes.

      But one Raven+ profile is associated with one Google account only. You will have to create another Raven+ profile for the other Google account - just duplicate the existing Raven+ data directory into another directory with a different name and create a new profile in Raven+.

      Or (I haven't tried this) perhaps your 1st Google account can grant 'Blog authors' permission to your 2nd Google account and simplify your setup. From your Blogger dashboard select Settings > Basic > Permissions.

      Delete
  11. Hi TC - in the end I set up each profile wit it's own clinet_secrets.json file but neither worked because when I used "APIs & auth > Credentials - create new Client ID (select "Installed Application", the default setting)." the installed Application wasn't available.

    I had to use "Other application" option and although the application was authorised OK for both accounts but it failed to create the credentials.dat files.

    Any ideas?

    ReplyDelete
    Replies
    1. I think Google has changed the screen. I don't have the "Installed Application" option either.

      I double checked in my Developer Console dashboard and my OAuth2.0 Client ID is of type "Other". So you may be on the right track.

      I think you still have to wait at least 5 days before Google approves you request for Blogger API v3. You will receive an email from Google as I have written in my blog post above.

      Last resort, if all else fails, is to post a question at the Blogger Development forum:

      https://groups.google.com/forum/#!forum/bloggerdev

      Delete