API version 1 is not working

I am trying to use API version 1 as said here

But it always returns 400 error

When I try with version 2 it works

I need version 1 for my application because it returns the items with the full body, which I didn’t find in version 2

Do anyone know why version 1 is not working? or something similar to what I need in version 2?

Hi @Mohamed_Hesham Can you share the full API v1 request that you’re trying to make?

Here is a screenshot of the endpoint

This works when I use version 2

Sorry for being late, I didn’t get any notfication for your reply

Hey @Mohamed_Hesham, welcome to the forum!

Thanks for sharing that screenshot, it looks like the call you’re using is to our v2 API.

webflow.get is part of our v2 SDK. Check out our basic usage for v1 calls: GitHub - webflow/js-webflow-api: Node.js SDK for the Webflow Data API

I’d also make sure you’ve set the API version to 1.0.0.

Still v2 only works
For v1 I always get 400 error

Here is the new code

Thanks for the info @Mohamed_Hesham!

Are you using OAuth?

If you’re using an API token, you’ll need to generate a legacy API token from the site settings.

V1 Tokens only have access to V1 API, and V2 Tokens only have access to V2.

I believe the SDK will only work for v1 or v2, based on the options set.
Are you adding const webflow = new Webflow({ beta: true, ...otherOptions }); anywhere, as that will call the v2 end points?

Will do some testing on my end as well :slight_smile:

Just ran some tests on my end with the SDK.

The v1 API is working as expected when using a v1 token (Just a site token).
I get the “UnknownError” when using a v2 token on a v1 endpoint, which is expected.

Let me know how you get on!

Thanks for your help

I will try this note today

Hi @jonohale

I am stuck at getting v1 token

I click install in the webflow dashboard, then I choose the site then I click authorize app

This is how I get the v2 token

How could I get a v1 token?

Thanks for that info @Mohamed_Hesham!

v2 Apps are not able to access the v1 endpoints, same goes with v1 Apps, they can only access v1 endpoints.

You’ll need to use v2 endpoints if you’re making a v2 App.

So, how to make a v1 app?

With the release of our v2 API, it’s only possible to create v2 OAuth Apps. We do have a guide you can follow on migrating to v2 here: Migrating to v2