Get a block
curl --request GET \
--url https://api.reintersect.com/v0/blocks/{blockId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/blocks/{blockId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/blocks/{blockId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reintersect.com/v0/blocks/{blockId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reintersect.com/v0/blocks/{blockId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reintersect.com/v0/blocks/{blockId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/blocks/{blockId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyBlocks
Get a block
Read one of your install’s blocks: props, state, version and whether it’s final.
GET
/
v0
/
blocks
/
{blockId}
Get a block
curl --request GET \
--url https://api.reintersect.com/v0/blocks/{blockId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/blocks/{blockId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/blocks/{blockId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reintersect.com/v0/blocks/{blockId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reintersect.com/v0/blocks/{blockId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reintersect.com/v0/blocks/{blockId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/blocks/{blockId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Reads a block your install created.
Authenticate with an install token or the interaction token for this block. No scope is needed.
With the SDK, call
Path
| Parameter | Description |
|---|---|
blockId | The block id. |
Response
| Field | Type | Description |
|---|---|---|
id | string | The block id. |
appId | string | Your app’s id. |
type | string | The block type. |
props | object | The props the block was created with. |
state | object | The current state. |
version | number | Increases with every change. Pass it as expectedVersion. |
final | boolean | Whether the block is locked. |
summary | string | The block’s current summary. |
circleId | string | null | The circle the block is in. |
conversationId | string | null | The conversation the block is in, or null for a chat message not filed in one. |
replyId | string | null | The reply that holds the block, or null in the opening post. |
createdAt, updatedAt | string | ISO 8601 timestamps. |
Errors
_tag | Status | Cause |
|---|---|---|
ReintersectAppBlockNotFoundError | 404 | No block with this id belongs to your install, or the interaction token is for another block. |
reintersect.blocks.get(TaskBlock, blockId).