curl --request POST \
--url https://api.meetingkit.com/api/v1/calendar_connect_links \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "wks_01k6a2r9s8x7c2dvq3m5n6p4ab",
"return_url": "<string>",
"member_data": {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {
"gurusup_user_id": "usr_8812"
}
},
"member_id": "<string>",
"client_reference_id": "<string>"
}
'import requests
url = "https://api.meetingkit.com/api/v1/calendar_connect_links"
payload = {
"workspace_id": "wks_01k6a2r9s8x7c2dvq3m5n6p4ab",
"return_url": "<string>",
"member_data": {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": { "gurusup_user_id": "usr_8812" }
},
"member_id": "<string>",
"client_reference_id": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 'wks_01k6a2r9s8x7c2dvq3m5n6p4ab',
return_url: '<string>',
member_data: {
name: '<string>',
email: 'jsmith@example.com',
metadata: {gurusup_user_id: 'usr_8812'}
},
member_id: '<string>',
client_reference_id: '<string>'
})
};
fetch('https://api.meetingkit.com/api/v1/calendar_connect_links', 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.meetingkit.com/api/v1/calendar_connect_links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspace_id' => 'wks_01k6a2r9s8x7c2dvq3m5n6p4ab',
'return_url' => '<string>',
'member_data' => [
'name' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
'gurusup_user_id' => 'usr_8812'
]
],
'member_id' => '<string>',
'client_reference_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.meetingkit.com/api/v1/calendar_connect_links"
payload := strings.NewReader("{\n \"workspace_id\": \"wks_01k6a2r9s8x7c2dvq3m5n6p4ab\",\n \"return_url\": \"<string>\",\n \"member_data\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {\n \"gurusup_user_id\": \"usr_8812\"\n }\n },\n \"member_id\": \"<string>\",\n \"client_reference_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meetingkit.com/api/v1/calendar_connect_links")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"wks_01k6a2r9s8x7c2dvq3m5n6p4ab\",\n \"return_url\": \"<string>\",\n \"member_data\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {\n \"gurusup_user_id\": \"usr_8812\"\n }\n },\n \"member_id\": \"<string>\",\n \"client_reference_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetingkit.com/api/v1/calendar_connect_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"wks_01k6a2r9s8x7c2dvq3m5n6p4ab\",\n \"return_url\": \"<string>\",\n \"member_data\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {\n \"gurusup_user_id\": \"usr_8812\"\n }\n },\n \"member_id\": \"<string>\",\n \"client_reference_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"workspace_id": "wks_01k6a2r9s8x7c2dvq3m5n6p4ab",
"member_id": "<string>",
"provider": "google",
"return_url": "<string>",
"client_reference_id": "<string>",
"member_data": {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {
"gurusup_user_id": "usr_8812"
}
},
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"status": "open",
"calendar_connection_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}Create a calendar connect link
A hosted link that takes one of your users through Google or Microsoft consent and
connects their calendar. Put url behind your “Connect calendar” button: create it
when your page renders, or from a route of your own behind your login that creates it
and redirects. Creating one again for the same member, provider, return_url,
client_reference_id and member_data while one is open returns that link, so a
page that creates a link on every render adds nothing.
After consent the browser returns to return_url with
calendar_connect_link_id, status (connected or error), and member_id,
calendar_connection_id, error and client_reference_id when they apply.
calendar_connection.connected is sent as well.
Send member_data and the member is created when the user consents, with that name
and metadata. Its email is the account the user connects, as the provider verifies
it (a Microsoft account’s user principal name), and it is never one of the workspace’s
owners or admins. member_data.email only pre-fills the provider’s account chooser.
Send member_id instead to reconnect a member you already have: whichever account
they approve is connected. A member whose calendar is already connected, through the
API or in MeetingKit, must be disconnected first.
curl --request POST \
--url https://api.meetingkit.com/api/v1/calendar_connect_links \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "wks_01k6a2r9s8x7c2dvq3m5n6p4ab",
"return_url": "<string>",
"member_data": {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {
"gurusup_user_id": "usr_8812"
}
},
"member_id": "<string>",
"client_reference_id": "<string>"
}
'import requests
url = "https://api.meetingkit.com/api/v1/calendar_connect_links"
payload = {
"workspace_id": "wks_01k6a2r9s8x7c2dvq3m5n6p4ab",
"return_url": "<string>",
"member_data": {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": { "gurusup_user_id": "usr_8812" }
},
"member_id": "<string>",
"client_reference_id": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 'wks_01k6a2r9s8x7c2dvq3m5n6p4ab',
return_url: '<string>',
member_data: {
name: '<string>',
email: 'jsmith@example.com',
metadata: {gurusup_user_id: 'usr_8812'}
},
member_id: '<string>',
client_reference_id: '<string>'
})
};
fetch('https://api.meetingkit.com/api/v1/calendar_connect_links', 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.meetingkit.com/api/v1/calendar_connect_links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspace_id' => 'wks_01k6a2r9s8x7c2dvq3m5n6p4ab',
'return_url' => '<string>',
'member_data' => [
'name' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
'gurusup_user_id' => 'usr_8812'
]
],
'member_id' => '<string>',
'client_reference_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.meetingkit.com/api/v1/calendar_connect_links"
payload := strings.NewReader("{\n \"workspace_id\": \"wks_01k6a2r9s8x7c2dvq3m5n6p4ab\",\n \"return_url\": \"<string>\",\n \"member_data\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {\n \"gurusup_user_id\": \"usr_8812\"\n }\n },\n \"member_id\": \"<string>\",\n \"client_reference_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meetingkit.com/api/v1/calendar_connect_links")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"wks_01k6a2r9s8x7c2dvq3m5n6p4ab\",\n \"return_url\": \"<string>\",\n \"member_data\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {\n \"gurusup_user_id\": \"usr_8812\"\n }\n },\n \"member_id\": \"<string>\",\n \"client_reference_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetingkit.com/api/v1/calendar_connect_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"wks_01k6a2r9s8x7c2dvq3m5n6p4ab\",\n \"return_url\": \"<string>\",\n \"member_data\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {\n \"gurusup_user_id\": \"usr_8812\"\n }\n },\n \"member_id\": \"<string>\",\n \"client_reference_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"workspace_id": "wks_01k6a2r9s8x7c2dvq3m5n6p4ab",
"member_id": "<string>",
"provider": "google",
"return_url": "<string>",
"client_reference_id": "<string>",
"member_data": {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {
"gurusup_user_id": "usr_8812"
}
},
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"status": "open",
"calendar_connection_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}{
"errors": [
{
"code": "invalid",
"field": "recording.methods.bot.mode",
"message": "must be one of: audio_and_video, audio_only, inherit"
}
]
}Authorizations
Your API key, sent bare. See Authentication.
Body
Workspace ID, beginning with wks_. Treat it as an opaque string. Integer workspace ids are still accepted.
"wks_01k6a2r9s8x7c2dvq3m5n6p4ab"
The calendar to connect.
google: Google Calendar.microsoft: Microsoft Outlook calendar.
google, microsoft An absolute https URL. The browser returns here after consent, with the outcome in the query string.
2048The member to create when the user consents. Nothing is created until then.
Show child attributes
Show child attributes
An existing member to reconnect, or one you created with POST /members. Whichever account
they approve is connected. Not with member_data; send neither to create the member from the
connected account with no name or metadata.
Your own id for the user, echoed on return_url and the link.
255Response
The link, new or the open one it matched.
Stable typed ID beginning with ccl_.
Always calendar_connect_link.
Workspace ID, beginning with wks_. Treat it as an opaque string.
"wks_01k6a2r9s8x7c2dvq3m5n6p4ab"
The member connecting, or null to create the member from the connected account.
The calendar to connect.
google: Google Calendar.microsoft: Microsoft Outlook calendar.
google, microsoft Where the browser returns after consent, with the outcome in the query string.
Your own reference, returned on the redirect.
The member the consent creates, as you sent it (metadata is {} when you sent none), or null.
Show child attributes
Show child attributes
The link to send the user to. null once it can no longer be opened.
When the link stops working, 24 hours after it was created.
open: waiting for the user, including after they declined consent.completed: the user connected their calendar; seecalendar_connection_id.failed: it could not connect;errorsays why.expired: 24 hours went by.
open, completed, failed, expired The connection it made, once status is completed.
Why the link failed, or null.
Show child attributes
Show child attributes
When the link was created, in ISO 8601.