The error is “502: API Services rejected request with error. HTTP 0 (HTTP 403)”. It happens 100% of the time when I try to GetAsync(key). The game is on Team Create and I am not the owner. I also tried to get the owner cut the script and paste it back, it does not work.
Yes you can. You just can’t change any game settings you’re not authorised to. I believe you can set API access for group games but not personal team creates. Either one doesn’t affect production data stores (in-game) and HttpService.HttpEnabled doesn’t need to be enabled to utilise DataStores.
The HTTP response code you are seeing (HTTP 403 - Wikipedia) refers to when your client is doing something you are not “allowed” by the server to do. An HTTP server usually responds with this code if your client doesn’t have access to make the request.
Taken straight from the Wikipedia article: Error 403: "The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated."
@colbert2677 What you say I can assume to just be an affect of the HTTP response code. Yes it is a data store error, but that does not necessarily mean it is not the developer’s fault for this response.
The developer hub article you posted has this to say:
Error X occurred when processing on Roblox servers. Depending on the response, you may want to retry the request at a later time.
This doesn’t say anything about this being Roblox’s fault and doesn’t imply that the developer should wait for a fix in any way.
My guess as to what is causing this problem is simply, you are not the owner of the place.
This may be related to a fix for a bug where places created using Create/Save place APIs would give the person the place was created for datastore access but it may also be related to something else.
In the meantime, try using Team Test and see if this fixes your problem. If it doesn’t than something is definitely wrong since Team Test uses a real Roblox server.
HTTP 403 is coming from the backend and 502 is the response being thrown by using the methods. This bug has already been reported several times and it’s not a developer’s issue for it. It has already been said multiple times in the thread:
The owner has already attempted to use DataStore code.
The requirements to use DataStores are fulfilled.
Being the owner of a place is not required to access any services. That is not the issue here.
You are linking me to a search for DataStore error 502 which is simply an error that occurred on Roblox’s server. This could be any error, or in this case an HTTP 403 which is literally saying that you are unauthorized to make the datastore request.
In the response code it specifically says not to retry this request as it is unauthorized.
You can’t let just anyone edit your datastores can you? That would be insecure. The response code says that you don’t have permission to make this request for whatever reason that may be.
HTTP 403 is a permission denied error, so it’s not something you’re doing wrong (usually).
So, could this be happening because the team-create server is issuing the request, not a game server, so it’s not authorised to do so? I’m pretty sure that when you start a team test/test server session from in team create it hosts the test server on the team create session.
But regardless, this is a bug, so you need to report it.
I’ve just spent a couple of hours trying to figure this out. Here’s the solution for future people.
Retoggling these two fixed the issue and I’m no longer denied datastore access. This was confusing because they were already enabled, just had to reenable.