How to get the channel_editor (dont mine)

I suggest you o read all the docs, expecially this and the “Getting tokens” section: everything will be clearer after reading all of this.

Anyway, I’ll try to provide you a pseudo-code of what you’re supposed to to asap.

Meanwhile, you should try to print some useful informations, like the response code of the request in order to understand what you’re doing wrong.