# Quick Start

## Instance and Token

To continue with our quick start, you will have to have a Blocworx instance made available to you and a user with an authorization token created. Please [contact us](https://www.blocworx.com/contact-us/) for assistance on getting this set up.&#x20;

{% hint style="info" %}
We assume in this documentation that you are a Blocworx user. We will be making reference to terms that are used in Blocworx only. If you are still unsure how to do no-code development in Blocworx why not check out our [manual instead](https://manual.blocworx.com).
{% endhint %}

## Simple Request to Get Data from a Bloc

In the below examples we will use example.mydomain.com as the domain your Blocworx instance is hosted on, and \[AUTHTOKEN] will represent the token that will be provided to you. The Bloc ID in this example will be 1234.<br>

In this request we will be simply getting data from a bloc without filters or any more criteria. For more advanced Get Data API endpoints check out our [Get Data API Reference](https://manual.blocworx.com/blocworx-api/reference/api-reference/getting-data).

{% tabs %}
{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://example.mydomain.com/api/get-data',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "blocId": 1234
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer [AUTHTOKEN]',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endtab %}

{% tab title="jQuery" %}

```javascript
var settings = {
  "url": "https://example.mydomain.com/api/get-data",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer [AUTHTOKEN]",
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({
    "blocId": 1234
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

```

{% endtab %}

{% tab title="Node JS" %}

```javascript
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'example.mydomain.com',
  'path': '/api/get-data',
  'headers': {
    'Authorization': 'Bearer [AUTHTOKEN]',
    'Content-Type': 'application/json'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "blocId": 1234
});

req.write(postData);

req.end();
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

url = "https://example.mydomain.com/api/get-data"

payload = json.dumps({
  "blocId": 1234
})
headers = {
  'Authorization': 'Bearer [AUTHTOKEN]',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

{% endtab %}
{% endtabs %}
