I created a new extension with ycommercewebservice template.
Deactivated ycommercewebsite from localextensions.xml and added mine.
When trying to reach any of the rest endpoints I always get the platform login screen.
What am I missing?
If you get HAC login screen (I assume that's what you mean by platform login screen), that means you're access the HAC web context and not your extension. You need to make sure your extension is defining a web context. I don't remember how it works with the web service template, but check in extensioninfo.xml if there is a web element. You can also check in hAC extensions tab if your extension is loaded and has a web context, you should see it there.