How to enable past broadcast using api

There is no public API for enabling a user’s past broadcasts. You will have to direct your users to this page:

Twitch

Where “:username” is their username.

But here’s how it works anyways:

They send a PUT request to https://api.twitch.tv/v5/channels/:user_id/channel_properties with form data like this: save_vods=true. You can’t use this though, I’ve tried. It requires a special OAuth token that 3rd party developers cannot get. Even then I think it requires something else to commit the change. Here’s the data you get back:

{
	"id": "user id",
	"name": "user name",
	"delay_length": 0,
	"hls_segment_duration": 0,
	"save_vods": true,
	"stream_key": "--",
	"authorized_stream_keys": [],
	"delay_controls_enabled": false
}