Common Issues and Troubleshooting
When making a request to Joystick to get configuration content, you may get a 400, 401 or other error response. Here are some common issues and solutions.
- Make sure the endpoint is correct and it is a POST request.
- Make sure the headers and API Key are correct.
- Make sure the request body is sent correctly.
- Make sure the contentId is available in the same environment as the API Key has been provisioned for.
Make sure the endpoint is correct and it is a POST request.
Generally, you'll want to use the dynamic content endpoint. This requires a POST request.
Make sure the headers are correct.
The request requires two headers Content-Type
and X-Api-Key
.
Request Attribute | Value | Required | Notes |
---|---|---|---|
Content-Type |
application/json | Yes | |
X-Api-Key |
Your API Key | Yes | The API key created for the environment you are targeting. This is different for each environment. |
Make sure the request body is sent correctly.
Please see below for some correct and incorrect examples of the body.
// ✅ Simply an empty root object is fine.
{}
// ✅ A body with only the "u". It can be any string. Typically a UUID or some other individual identifier.
{
"u": ""
}
// ✅ "u" as an empty string, "p" as an empty object.
{
"u": "",
"p": {}
}
// ✅ A body that has all of the optional components.
{
"u": "the-unique-user-id",
"v": "3.2.1",
"p": {
"level": 1,
"location": "north_pole",
"balance": 101,
"days_since_install": 14,
"collectibles": ["bear", "tiger", "fish"]
}
}
Make sure the contentId is available in the environment the API Key has been provisioned for.
In Joystick each API Key only has access to content of the environment it was provisioned for. For example, if you create a piece of content in "Development" environment, then create a key in "Production" environment, that new key will not be able to retrieve the configuration content unless the content has been pushed/synched to "Production". Joystick provides a full suite of tools sync configuration content between different environments, including review and multi-user approval processes.
Still having issues? Reach out!
Click below to over to our Discord server for tips, support and more!