Announcing Datastore APIs for Open Cloud

Are we ever going to get official support for creating developer products, currently we have to use the client API to do this which does not work very well especially when it involves the usage of cookies.

Repost from Recent and Upcoming Changes to Roblox Web APIs - #36 by parker02311

While trying to create a key, I stumbled accross this error. I am using Aiohttp library for asynchronous code.

{'error': 'INVALID_ARGUMENT', 'message': 'Invalid content length, it should be positive.', 'errorDetails': [{'errorDetailType': 'DatastoreErrorInfo', 'datastoreErrorCode': 'InvalidContentLength'}]}

Full code below:

async def create_key(self, datastore: str, key: str, data, scope=None):
        params = {"datastoreName": datastore, 'entryKey': key}
        if scope:
            params["scope"] = scope
        
        encoded = str.encode(json.dumps(data))
        checksum = hashlib.md5(encoded).digest()
        checksum = base64.b64encode(checksum)
        #print(checksum,"md5")
        #print(type(checksum))
        headers = self._H()
        headers["content-md5"] = str(checksum)
        headers["Content-Type"] = 'application/octet-stream'
        print(len(encoded))
        headers['content-length'] = str(len(encoded))
        CS = aiohttp.ClientSession(headers=headers)
        req = await CS.post(self._objects_url, params=params, data=encoded)
        await CS.close()
        #print(req, "REAL REQ")
        req = await req.json() 
        print(req, "rrl")
        return req

I am unsure why this is happening.

Why are you setting content length?

1 Like

Using aiohttp, the API returns Invalid content length

Content length usually gets set automatically though??

Not with aiohttp tho, it apparently doesn’t set it

I used crypto to change my information to md5 64-bit.

1 Like

No API to remove particular version (similar to RemoveVersionAsync)?

No OpenCloud does not support that endpoint.

Hi,

Can you explain the use case for programmatically access developer products? Why that’s import to you?

Hi, this can be useful for systems where instead of the user having to purchase multiple gamepasses and or products by repeatable hitting confirm you could program an API function to create(or find) a developer product that matches the total making it much more user friendly.

We do now have a way to create them using Develop Api but no way to find them (there is a undocumented method that returns the incorrect ID type [Action Needed] Sunsetting api.roblox.com - #8 by Julli4n). And with API keys becoming a thing using Open Cloud it would provide a much safer option to do these actions.

Now personally, I would use a Open Cloud version for my open source purchasing hub that allows users to purchase RBXM files using Robux (No real currency involved) within our cart system to make it so you no longer have to provide a cookie which could pose a security risk.

Are there any plans to increase the rate limit for larger games? We’re hitting 429 (have about 16k CCUS) as we’re not able to transfer datastores we allow players to transfer their data over to the new game but we seem to be hitting the limit quite often, we even purchased another server but still not luck.

Are OrderedDataStores going to be added? In particular, I (and I’m pretty sure that others as well) would like to see the GetSortedAsync added.

The API works great and I’ve been using it to manage some of our DataStores, but there is no workaround on how could we get a key (or keys) with the highest (or lowest) value.
ListEntries might sound like a valid workaround (even though very bad) for some people, who don’t store too many entries in their OrderedDataStore, but this isn’t viable for people who store many entries in their stores.

2 Likes

Thanks for sharing!

Are you talking about building a website that allow users to purchase passes and products with better UX?

Why you need to hit the API to create dev products instead of using the web UI or Studio?

It seems like you’d need ways to upload asset to user’s account after purchase, and an API to charge Robux, correct?

Hi, have you tried to use multiple API keys? Although less convenient but you can get more quota this way.

This is WIP, but no concrete timeline yet.

2 Likes

Yes, sadly there’s just too much traffic too handle, one option was to just download the entire datastore using Open cloud tools, but the rate limiting is too extreme, would take a year to download.

I think you have misunderstood the point of the system I am talking about.

There is large community of technology groups on Roblox that make scripts/products(for Roblox) and sell virtual licenses to these products using Robux(via devproducts in a game), when these products load up in a game the script contacts an external server to ask if the owner of the game has the license to the product.

One of the biggest pains of these “purchasing hubs” is that if you want to purchase multiple products you go through one-by-one and purchase each one, what I am asking for is a open cloud endpoint that allows access to developer products so in these Roblox hubs you can have a cart system to either find or create a developer product to buy bulk items.

I already have a system that does it, but it uses cookies which is less then ideal especially after the change restricting cookies to certain IP addresses. Example of coding a system like this in Python.

Getting 401 Unauthorized errors when trying to use this API. There aren’t any associated error codes for this in the docs, so I’m having a really hard time debugging. Any help?

Make sure that you are using an IP address that is listed in your Accepted IP Addresses and that you’re using the correct Key.
image