400 Bad request

Share

User

You said:

I am encountering a 400 Bad Request error with the message “Unknown Error Occurred” when making API requests to the /sites or /collections endpoints using my Webflow API token. Below is what I’ve already tried to troubleshoot the issue: Steps Taken to Resolve the Issue Verified the API Token: I generated a new API token in Account Settings > API Tokens. The token has CMS Read-Only access. I ensured the token was copied correctly and included in the Authorization header as Bearer I sent a GET request to the /sites endpoint using the following cURL command: bash Copy code curl -X GET “https://api.webflow.com/sites” \ -H “Authorization: Bearer <my_api_token>” \ -H “accept-version: 1.0.0” . Response: json Copy code { “msg”: “Unknown Error Occurred”, “code”: 400, “name”: “UnknownError”, “path”: “/sites”, “err”: "UnknownError: Unknown Error Occurred"Validated Collection ID: For /collections and /collections/{collection_id}/items, I used the Collection ID directly from the Webflow CMS. I confirmed the Collection ID is accurate.


Here is my site Read-Only: LINK
[(how to share your site Read-Only link)](Webflow - Travel Kitchen)

I have also generated a new api token with all permission read and write and I still bget the same message.

Hi @Travel_Kitchen ! You may be trying to use a v2 API token against a v1 API route - if you want to get a list of Sites, please refer to our v2 API documentation routes here (in this case, https://api.webflow.com/v2/sites)

Same for other routes you may be trying to use it on, ensure that it’s prefixed with /v2 in the route. Hope this helps!

Ok thank you I will take a look

I have now solved this thanks

1 Like