I saw that a lot of people have been searching for code to connect with the Premium API, so here it goes my take on that. It’s a bit clunky but it should work for now.
Feel free to let me know if you have any questions. The authentication side was borrowed from someone who had a similar question not that long ago. I just adjusted it and adapted it.