Beginner
13m read

Doicker

1

Request Body

All other requests will have their parameters passed in as part of the JSON-formatted request body. POST, PUT and PATCH requests including JSON-formatted request bodies should ensure the Content-Type header is set to application/json.

curl https://api.webflow.com/ \
 -H "Content-Type: application/json" \
 --data-binary $'{ "key": "value" }'

curl https://api.webflow.com/ \
 -H "Content-Type: application/json" \
 --data-binary $'{ "key": "value" }'

2

Authentication

In order to access the API, you will need to provide an access token to authenticate with the API server. That token will be required for all API requests. You can acquire that token in one of two ways.

const webflow = new Webflow({ token: api_token });

// Promise <Item>
const item = webflow.item({ collectionId: '580e63fc8c9a982ac9b8b745', itemId: '580e64008c9a982ac9b8b754' });

item.then(i => console.log(i));

const webflow = new Webflow({ token: api_token });

// Promise <Item>
const item = webflow.item({ collectionId: '580e63fc8c9a982ac9b8b745', itemId: '580e64008c9a982ac9b8b754' });

item.then(i => console.log(i));

3

Common Usecases

Collaboration across teams and tools works best when everyone stays in sync and processes flow easily and without friction. This is why we have Asana's API: it's a platform to ensure all of your information is up to date and that your teams stay efficient and in the loop

# replace with your personal access token. 

personal_access_token = '0/123456789....'


# Construct an Asana client

client = asana.Client.access_token(personal_access_token)

# Set things up to send the name of this script to us to show that you succeeded! This is optional.

client.options['client_name'] = "hello_world_python"


# Get your user info

me = client.users.me()


# Print out your information

print("Hello world! " + "My name is " + me['name'] + "!")

# replace with your personal access token. 

personal_access_token = '0/123456789....'


# Construct an Asana client

client = asana.Client.access_token(personal_access_token)

# Set things up to send the name of this script to us to show that you succeeded! This is optional.

client.options['client_name'] = "hello_world_python"


# Get your user info

me = client.users.me()


# Print out your information

print("Hello world! " + "My name is " + me['name'] + "!")

4

Request Body

All other requests will have their parameters passed in as part of the JSON-formatted request body. POST, PUT and PATCH requests including JSON-formatted request bodies should ensure the Content-Type header is set to application/json.

const Webflow = require('webflow-api')
const webflow = new Webflow({ token: 'd59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32' })

webflow.info()
 .then(info => console.log(info))

const Webflow = require('webflow-api')
const webflow = new Webflow({ token: 'd59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32' })

webflow.info()
 .then(info => console.log(info))

5

Custom Apps

Server-side
First, make sure that you have set up an account name on the Stripe Dashboard.


{

 "data": {

   "gid": "12e345a67b8910c11",

   "email": "jonsnow@example.com",

   "name": "Jon Snow",

   "photo": {

     "image_21x21": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_21x21.png",

     "image_27x27": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_27x27.png",

     "image_36x36": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_36x36.png",

     "image_60x60": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_60x60.png",

     "image_128x128": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_128x128.png"

   },

   "resource_type": "user"

 }

}

{

 "data": {

   "gid": "12e345a67b8910c11",

   "email": "jonsnow@example.com",

   "name": "Jon Snow",

   "photo": {

     "image_21x21": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_21x21.png",

     "image_27x27": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_27x27.png",

     "image_36x36": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_36x36.png",

     "image_60x60": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_60x60.png",

     "image_128x128": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_128x128.png"

   },

   "resource_type": "user"

 }

}

Next doc

Try Engrafa — it's free

Engrafa is number one project managment tool. Make your team collaboration as seamless as possible.

Go to Engrafa.com