Datastore Error 502 (HTTP 403 Forbidden)

I’ve been using a datastore in my testing studio for a few months now, and starting a few days ago every new SetAsync call (in private and group owned workspaces) to my datastore returns “[502: API Services rejected request with error. HTTP 403 (Forbidden)]”. I’ve tried using it in different workspaces and from what I’ve read this issue is usually related to the code being run on a team create, which it isn’t. Here’s a screenshot of the SetAsync section of my code snippet.

https://gyazo.com/6eb3067f85ebfd37d2700fabe07bab4d

None of this has been edited in a while, so I’m confused as to why I’m getting the error I am. I’d rather not share too much else of what I’m working on, but let me know if there are any pertinent snippets I could show to help.

PS: Sorry for the C tier formatting

Edit: Yes Studio API access is enabled.

2 Likes

Hi, error 502 usually means an error occured while processing the data, HTTP 403 is the error type. I guess you have to go in GameSettings>Security>Enable Studio Access to API Services, set it to ON, if this doesn’t fix try looking in the link down below.

This developer post should help you with DataStores: Documentation - Roblox Creator Hub

Hope this helps,
aren1toross

Nope, that generally gives you a pretty direct error message telling you explicitly to turn API access on. (It’s enabled)

Can I have a screenshot of the output, please.

Sure thing, https://gyazo.com/2d606e2b5c766a9eaa0ab0091001a54b

Is it a team game or not ?
It can be because of insufficient permissions.

Someone talked about it here: 502: API Services rejected request with error. HTTP 403 (Forbidden)

You might want to go check it out to fix your problem.

No, it is being run on my private studio.

Sorry if that wasn’t clear.

The roblox developer page says this for error 502:

Depending on the response, you may want to retry the request at a later time.

More info here: Documentation - Roblox Creator Hub

Are DataStores down in your region ?

No, I can retrieve from the same data store in the same game perfectly fine, but saving to the data store blocks my access.

There may be an issue on Roblox’s side. There’s been outages all day.

3 Likes

Can I have the script please ?

No, it’s extremely long and I don’t feel like releasing the entire thing. If you have anything specific you’d like to look at I’ll try and help.

Ok, sure.
It’s probably a roblox side problem, DataStores have been expiriencing a lot of issues this weekend.

I’ve considered this, but the error has been persistent for perhaps the last 3 or 4 days. I’m checking it over three times a day. Still possible though.

1 Like

The Roblox servers have had issues intermittently these past days, it probably will be fixed very soon. I don’t think it’s on you.

Hope so, I’ll add a solution to the post if it gets fixed that way.

Your issue is your game doesnt allow API Server request such as datastores. You need to enable it

The OP mentioned it here:

It’s VERY likely it’s on Roblox’s side, not the OPs

2 Likes

Still not working in studio, but in game saving works fine. In addition, I can retrieve from the datastore just fine while in studio, just can’t save stuff.