There's a way to update Blogger HTML gadget using JavaScript, but you will need an access token that have to be copied manually from another network request.
at. That's your dashboard access token. Copy it.![]() |
| Blogger Dashboard Access Token. |
Here's the script to update a widget. Fill in the blank with your configuration:
// update HTML widget of a blog
// configuration
let blogId = '___'
let widgetId = 'HTML1'
let widgetTitle = 'Example Widget'
let widgetContent = 'Example widget content'
let accessToken = '___'
let widgetData = [];
widgetData[0] = widgetId
widgetData[1] = 15
widgetData[16] = [widgetTitle, widgetContent]
widgetData[33] = 1
let updateDate = [blogId, widgetData]
const formData = new FormData();
const data = new URLSearchParams();
data.append('f.req', JSON.stringify([[["ehMEXb",JSON.stringify(updateDate),null,"generic"]]]));
data.append('at', accessToken);
fetch("https://draft.blogger.com/_/BloggerUi/data/batchexecute", {
"headers": {
"content-type": "application/x-www-form-urlencoded;charset=UTF-8",
},
"body": data.toString(),
"method": "POST",
"mode": "cors",
"credentials": "include"
});Configuration:
blogId
Your Blogger blog ID.
widgetId
The ID of the widget that you want to update.
widgetTitle
The title of the HTML widget.
widgetContent
The content of the HTML widget.
securityToken
Blogger security token found in a batchexecute request. You can use the same one for more than 24 hours, it seems.
**
https://www.blogger.com/rpc_relay.html https://www.blogger.com/comment/frame/220561901913020919?po=8624397615555766327&hl=en&saa=85391&origin=https://xmlexpr.blogspot.com&skin=contempo https://xmlexpr.blogspot.com/2025/09/update-blogger-html-gadget-using-javascript.html#comments https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilvrQealDE-Ixl-oxDYG4lMAocoN7UeIVEkBQgiV4047EYCY-qUyW1J0hbgjGbpdpIfsBZVckz7nv_uBgY-7v9YjujGhNbY8flW73T98O_Rt_10hUJ-FzFqSUAAVhpX-5oNMAmGnC08BetqeGiPyiRu13Qld9aSEPuMGV75oxaUucAhEcVApN8TZXZDy4q/s72-w640-c-h584/blogger-dashboard-access-token.png true ["template-development"]