Your key may have expired, or may not have permission to access this resource error when trying to interact with OpenCloud API for Datastore

On the 15th, I randomly got this error that surprised me and I’m not sure why roblox blocked me from making a request to OpenCloud API, and I follow all of roblox’s guidelines and ratelimits, but I’m not sure why this is happening. I do use this library.

PC Info: Ubuntu Linux, Code Server (Lastest Version) if you need link,
Date First Experienced: 7/15/2023
Date Last Experienced: Still going on

Reproduction Steps:

  1. Run OpenCloud API datastore
import rblxopencloud, os 

from dotenv import load_dotenv

load_dotenv()

ethosExperience = rblxopencloud.Experience(4293350397, api_key=os.getenv("OPENCLOUD_DATASTORE_SECRET"))

datastore = ethosExperience.get_data_store("Hidden", scope="global")

print(datastore.get(225887981))
  1. You will get Your key may have expired, or may not have permission to access this resource

Let me know what I can provide to assist you in debugging this further.

2 Likes

Hi, your API key may have expired as indicated by the error message. You can check on the status of your API keys on Creator Dashboard here

The status will indicate whether or not your key has expired. In order to reactivate your key, you can regenerate the key or create a new one.

Hope this helps :slight_smile: !

2 Likes

Heyo, I reged (created a new one) my key, but it still says this and I’m not sure what’s wrong with it.

1 Like

Does it say it on the Creator Dashboard site or does it still return an error for you when you call a DataStores endpoint?

1 Like

It returns an error for me whenever I call a datastore endpoint and it says “Active” https://i.imgur.com/d65frKs.png

1 Like

Hm just sanity checking

  1. Did you give the API Key the permission to the correct game?
  2. Did you give the API Key permission to the correct service? We have Ordered DataStores and also a general DataStores scope options.
1 Like
  1. Yes, doubled checked that it is correct.
  2. Yes, doubled check as https://i.imgur.com/ASxNvF7.png
1 Like

That’s strange. We will investigate further. Just to confirm your universeId is 4293350397?

Also if its not too much work could you try hitting this endpoint with a curl, postman or any other type of request?

1 Like

It works on my local machine, but not on my server. I doubled checked my IP address, but it is the correct one that I whitelisted on creator dashboard.

looks like that is correct, yes

1 Like

Could you actually try 0.0.0.0/0 as the whitelisted IP address and see if that works on your server?

1 Like

Already did, but still doesn’t work.

1 Like

What is your server hosted on?

1 Like

The code server is hosted on a virtual private server on a docker.

1 Like

Sounds good, I’ll get back to you after I look into this some more

2 Likes

Hi following up, when you tried this on your local machine did you use the same library? or did you try a different type of call?

I used the same library, created by Treeben7.

Hello, following up, it works…I do believe it was an issue on Python’s side because the .env file was not loading properly, and that caused my token to not get properly inserted. Sorry for the trouble, my fault. It works like normal.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.