Ok, FINALLY! I have a solution. I had to write an email to TC's email then send in a playground for testing to get this resolved.
The issue was my JWT auth token. For every previous endpoint that I used I set the scope to the full URL and it worked fine. I did the same for this endpoint but that's what causes the 405.
I have an issue with the 405 status code because it's not a bad method error, it's a bad token error. Apple says it works as intended. But it should really be a 401 Unauthorized, which would correctly indicate that the token is the issue.
For anyone having this issue the scope for this endpoint should be the path only for the endpoint, or excluded. I was only able to get it to work by excluding the scope. Apple claims that it worked for them using the url.path
I suspect there are other endpoints with the same response issue so if all else fails, remove the scope from your token and try again.
Thanks to everyone who tried to help, I tried everything you suggested but in the end the issue was that a bad http status response sent me chasing an error in my code that did not exist.
I'm not going to mark any answers as accepted because even though I am now unblocked, I don't think the solution actually solves the problem. Creating an auth token shouldn't require special exceptions to get random endpoints to accept authorization, and a returned status code should correctly indicate the problem.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: