Hey developers,
This announcement is intended for developers who directly interact with the Roblox Web APIs. If you only use our Lua APIs such as HttpService, you only need to read “Dropping support for TLS 1.0 and TLS 1.1.”
As our platform evolves, we want to keep you informed about changes to our web API endpoints. We are making a number of changes to increase reliability, boost security, and standardize the way our public APIs behave. In order to minimize disruption, we are giving you advance notice for several of the changes and providing an opportunity to give feedback.
These changes will accelerate our move towards the Open Cloud application ecosystem, where we provide a rich set of APIs for developers to interact with Roblox.
If you have any questions or concerns, feel free to reply to this post and we will follow up.
Recent Changes
Requiring HTTPS
In order to boost security, we have started requiring HTTPS (Hypertext Transfer Protocol Secure) across all our API endpoints.
Requests still using the HTTP protocol are now rejected with 400 status codes or redirected to HTTPS. Cookies will also include the secure attribute going forward, which prevents them from being attached to non-HTTPS requests.
Action Required: Please update any hardcoded URLs from http:// to https://
Cookie Authentication
As a general rule, we recommend using your .ROBLOSECURITY cookies on the same IP address that you logged in on.
If this does not work for your use case, please submit a feature request for API endpoints you think that we should support with API Keys through the Open Cloud initiative.
Action Required: Update automation to use cookies from static IP addresses
Goodbye .RBXID Cookie
Many of the endpoints on apis.roblox.com required a special .RBXID cookie for authentication. In order to simplify our systems, we have stopped supporting that cookie.
Going forward the best practice for authentication is to use API keys with Open Cloud endpoints or the .ROBLOSECURITY cookie for other web endpoints that do not yet support API keys. Be aware that the .ROBLOSECURITY cookie is sensitive, and leaking it is almost as bad as sharing your password.
Action Required: None
Upcoming Changes
Sunsetting api.roblox.com
As announced in Sunsetting api.roblox.com, we are deprecating all endpoints on api.roblox.com
.
Check out the announcement for a list of new endpoints you can upgrade to. If you cannot find replacement endpoints please let us know in the above thread.
Action Required: Upgrade any calls from api.roblox.com
to newer API endpoints by July 15, 2022
Unifying Standard Errors
If you are a prolific Roblox web developer, you may have noticed that the standard error responses vary quite a bit across different Roblox APIs for cases like:
- 401 Unauthorized (User is not logged in)
- 403 Token Validation Failed (Invalid XSRF token)
- 429 Too Many Requests
In order to reduce complexity and provide a uniform experience for developers, we are going to unify the error responses.
Action Required: Update code that rely on the ‘Status Text’ matching specific strings, or error code being equal to 0 by August 1, 2022
Here are the upcoming standardized error responses. They will be gradually rolled out over the next few months, so your code may need to handle both the old and new responses for a few months.
Error | Status Code and Status Text | Response Body |
---|---|---|
Invalid XSRF token | 403 (Token Validation Failed) | {“errors”:[{“code”:9001,“message”:“XSRF Token Validation Failed”}]} (also returns ‘x-csrf-token’ header) |
User is not logged in | 401 (Unauthenticated) | {“errors”:[{“code”:9002,“message”:“Unauthenticated”}]} |
User is moderated | 403 (Moderated User) | {“errors”:[{“code”:9003,“message”:“Moderated User”}]} |
Throttling | 429 (Too Many Requests) | {“errors”:[{“code”:9005,“message”:“Too Many Requests”}]} |
We recommend using the response body’s error code number (e.g. 9001) to differentiate between the errors. We do not provide any guarantee that the Status Text (e.g. Token Validation Failed) or response message will stay consistent over time for these standard errors.
Dropping support for TLS 1.0 and TLS 1.1
As announced a few days ago, we are dropping support for TLS 1.0 and 1.1 from calls made via HttpService.
Action Required: Upgrade your external web services (if accessed by HttpService) to support TLS 1.2 or higher if accessed by July 5, 2022