All articles

A Guide to Fixing Common REST API Errors

Situation

When working with the Wrike API, errors are inevitable. They can occur due to a variety of reasons such as insufficient user rights, account license limitations, or incorrect formatting. In this article, we will discuss some of the most common API errors and provide troubleshooting steps to help you quickly identify and fix these issues.

Important

Always double-check the API documentation.

Error Responses

The following represents a common error response resulting from a failed API request.

Status code: XXX
Response Body:

{
"errorDescription": "human-readable description of the error.",
"error": "short, standardized code or identifier for the specific error that occurred"
}

Status Codes

300 - Multiple Choices

Possible Cause

Incorrect Base URL.

Troubleshooting Steps

Check that your Base URL is correct.
Wrike stores customer data in multiple data centers located in the USA and the European Union. To access your data, please use the appropriate base URL for your data's location. You can determine your Base URL by looking at the URL in the address bar when you access your Wrike account in a browser.

400 - invalid_request

Possible Cause

  • Request HTTP type is invalid, request critical data is absent or malformed (e.g., no attachment body).
  • The header is missing.
  • The request parameter name is invalid.
  • The request parameter is not supported for the endpoint.

Example: A user tries to use the 'firstName' parameter in a GET/contacts call

Troubleshooting Steps

  • Check the API documentation to ensure that your request is correctly formatted: all parameters should be valid and supported by the endpoint.
  • Make sure all the necessary headers are included in the request.

400 - invalid_parameter

Possible Cause

  • The required parameter is absent.
  • The parameter value is filled in or formatted incorrectly.

Troubleshooting Steps

  • Double-check the documentation and make sure all parameters marked as required are present in your call.
  • Ensure the parameter's value is correct and formatted according to documentation.

400 - method_not_found

Possible Cause

An incorrect API method is used.

Example: A user tries to send a PUT/tasks call which is not supported. 

Troubleshooting Steps

Make sure the method you use is supported for the endpoint and is set correctly.

403 - not_allowed

Possible Cause

Requested action is not allowed due to license/quota limitations, etc.

  • The user does not have the necessary permissions to perform the requested action.

    Example: A user on a Business Plus subscription calls the GET/data_export method.

  • The account does not have the necessary license to perform the operation.
    Example: A Collaborator tries to update a Folder's title.

  • The operation cannot be performed.
    Example: A user tried to create an already-existing dependency.

Troubleshooting Steps

  • Review the user's permissions in the Wrike account settings. Make sure the user has the necessary permissions to access the requested resource.
  • Check the account's license. You may need to upgrade the license to use this API method.
  • Verify if the user can perform the same operation in UI.

404 - resource_not_found

Possible Cause

  • The requested resource does not exist.
  • The user does not have access to the requested resource

Troubleshooting Steps

Check the requested resource, and make sure the user whose token is used for the integration has access to it.

429 - too_many_requests

Possible Cause

Request rate from the same IP address (5000 / min) or request rate per user (400 / min) exceeded the limit. The first 400 requests per minute are served and anything above that returns status 429.

Troubleshooting Steps

  • If you encounter 429 HTTP responses to your request, consider using retries with exponential backoff.
  • Split the load between several users.
  • If the issue persists, contact our Support team

429 - rate_limit_exceeded

Possible Cause

The rate limit is exceeded

Troubleshooting Steps

Contact our Support team

500 - server_error

Possible Cause

  • The server encountered an unexpected condition that prevented it from fulfilling the request.
  • The user does not have access to the requested resource

Troubleshooting Steps

Empty response

Possible Cause

You are trying to fetch a resource that does not exist.

Example: A user sends a call to retrieve tasks from an empty folder with the GET/folders/{folderId}/tasks call

Troubleshooting Steps

Make sure the resource (e. g. task/folder/project, etc.) exists in the account.

Pro Tips

Identifying the account your token belongs to

Juggling multiple Wrike accounts and uncertain about the one your token is attributed to? Don't worry, it's easy to pinpoint. Simply proceed with the GET/account call to confirm.

Tracing the owner of your token

If you've been testing the API with multiple users and wish to identify the owner of a particular token, there's a simple and direct way. Retrieve the user's profile details by sending a GET/contacts?me=true call.

Contact Support

If hurdles persist, please contact our Support team and we’ll be happy to help you.

To speed up the resolution, please provide the following details:

  • Your goal with the API call.
  • The full API request you sent.
  • The response you received.
  • [In case of permission or token-related issues]
    The middle part of the token, so we can decode it on our end.

    Below is an example of an access token. We would need you to send us the part enclosed between 2 dots (highlighted in bold) and drop the parts before and after the dot:
    eyJ0dCI6InAiLCJhbGciOiJIUzI1NiIsInR2IjoiMSJ9.eyJkIjoie1wiYVwiOjM5MjA2MDIsXCJpXCI6NzIyMzMxOCxcImNcIjo0NjIwNzcwLFwidVwiOjY5NzA4NjcsXCJyXCI6XCJVU1wiLFwic1wiOltcIldcIixcIkZcIixcIklcIixcIlVcIixcIktcIixcIkNcIixcIkRcIixcIk1cIixcIkFcIixcIkxcIixcIlBcIl0sXCJ6XCI6W10sXCJ0XCI6MH0iLCJpYXQiOjE1OTk5MDk0MzV9.q3qOJs2swWSCgZl1ueKYsUyhME4RBD4cl53vZ0pwDcc

    Important

    Never send the whole token! Sharing your permanent token is equal to sharing your Wrike account password.

Top