Visitar URL original
GitHub - aavmurphy/blogger-oauth-javascript: Example using OAuth and Javascipt to log in to Blogger, then make an API v3 call to publish future dated posts. · GitHub
Skip to content

About

Example using OAuth and Javascipt to log in to Blogger, then make an API v3 call to publish future dated posts.

Resources

Stars

1 star

Watchers

2 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Example Blogger API V3 code using javascript and OAuth to create future dated posts

The problem

With the new Blogger GUI, future dated posts are 'scheduled', not 'published'

The New Solution [2026]

Publish the post with the current date and time. Add a date tag to the post, e.g. #2026-08-01T12:20 (note, no timezone at the end) with the desired time.

Use an API call to get the last N posts, but set the time using the hashtag time.

So, you have to display the page with javascript on your own website, not with Blogger (you could have a Blogger Page containing the javascript I guess)

Have a script that runs (say) daily, that loops thru your ordered posts

  • If the post is now in the past : set the date to be correct, and remove the hashtag
  • If the post is still in the future, set the date to be midnight today + N secconds (so a blogger sort returns the posts in the correct order)

The Previous Solution That No Longer Works [pre 2026]

There was an undocumented API change in Spring 2026.

Previously, you could use the API to move the post into the past when it can be published, then move it back to the future, keeping its published state :)

If you do this now, it becomes scheduled, not published

Using the PATCH API call to set the state to published does not work either.

The Demo for the Previous Solution that no longer works

Before you start. Do you need OAuth? Yes if you are using any non-public API calls.

Follow the loose instructions on the Blogger API V3 page to sign up for a Google Cloud Account. Create a project. Add Blogger API V3 to it, Create an API_KEY and a CLIENT_ID

Now, look at the code. You'll need to edit the stuff at the top.

Then open the page in your browser.

You'll need to edit the URL line (this example was taken from something specific)

oauth-blogger.html?post_id=123456789&date=2030-08-07T09:18:00.000+01:00

Hope this helps

Andrew

About

Example using OAuth and Javascipt to log in to Blogger, then make an API v3 call to publish future dated posts.

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages