Regenerate onboarding URL for a connection
curl --request POST \
--url https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_url": "https://myapp.com/quickbooks-setup-callback"
}
'import requests
url = "https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url"
payload = { "redirect_url": "https://myapp.com/quickbooks-setup-callback" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirect_url: 'https://myapp.com/quickbooks-setup-callback'})
};
fetch('https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url', 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://qubesync.com/api/v1/connections/{connection_id}/onboarding_url",
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([
'redirect_url' => 'https://myapp.com/quickbooks-setup-callback'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://qubesync.com/api/v1/connections/{connection_id}/onboarding_url"
payload := strings.NewReader("{\n \"redirect_url\": \"https://myapp.com/quickbooks-setup-callback\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://qubesync.com/api/v1/connections/{connection_id}/onboarding_url")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_url\": \"https://myapp.com/quickbooks-setup-callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_url\": \"https://myapp.com/quickbooks-setup-callback\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"app_id": "550e8400-e29b-41d4-a716-446655440000",
"username": "550e8400-e29b-41d4-a716-446655440001",
"last_connected_at": "2023-01-01T12:00:00Z",
"name": "My Customer Inc.",
"company_file": "My Company File.QBW",
"qbxml_version": "14.0",
"quickbooks_product_name": "QuickBooks Pro 2021",
"type": "standard",
"redirect_url": "https://myapp.com/quickbooks-setup-callback",
"links": {
"self": "/api/v1/connections/123e4567-e89b-12d3-a456-426614174000",
"ui": "/app/connections/123e4567-e89b-12d3-a456-426614174000",
"onboarding": "https://qubesync.com/onboarding/123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found"
}
}Connections
Regenerate onboarding URL for a connection
Generates a new onboarding URL for the specified connection. The previous URL will be invalidated.
POST
/
connections
/
{connection_id}
/
onboarding_url
Regenerate onboarding URL for a connection
curl --request POST \
--url https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_url": "https://myapp.com/quickbooks-setup-callback"
}
'import requests
url = "https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url"
payload = { "redirect_url": "https://myapp.com/quickbooks-setup-callback" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirect_url: 'https://myapp.com/quickbooks-setup-callback'})
};
fetch('https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url', 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://qubesync.com/api/v1/connections/{connection_id}/onboarding_url",
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([
'redirect_url' => 'https://myapp.com/quickbooks-setup-callback'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://qubesync.com/api/v1/connections/{connection_id}/onboarding_url"
payload := strings.NewReader("{\n \"redirect_url\": \"https://myapp.com/quickbooks-setup-callback\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://qubesync.com/api/v1/connections/{connection_id}/onboarding_url")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_url\": \"https://myapp.com/quickbooks-setup-callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qubesync.com/api/v1/connections/{connection_id}/onboarding_url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_url\": \"https://myapp.com/quickbooks-setup-callback\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"app_id": "550e8400-e29b-41d4-a716-446655440000",
"username": "550e8400-e29b-41d4-a716-446655440001",
"last_connected_at": "2023-01-01T12:00:00Z",
"name": "My Customer Inc.",
"company_file": "My Company File.QBW",
"qbxml_version": "14.0",
"quickbooks_product_name": "QuickBooks Pro 2021",
"type": "standard",
"redirect_url": "https://myapp.com/quickbooks-setup-callback",
"links": {
"self": "/api/v1/connections/123e4567-e89b-12d3-a456-426614174000",
"ui": "/app/connections/123e4567-e89b-12d3-a456-426614174000",
"onboarding": "https://qubesync.com/onboarding/123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found"
}
}Authorizations
Use your app's API_KEY as the username, and leave the password blank
Path Parameters
ID of the connection
Body
application/json
The URL to redirect the user to after they complete (or cancel) the QuickBooks setup process. This URL should be able to handle the query parameters:
?state=connectedif they completed the process,?state=cancelledif they cancelled it or?state=expiredif they visit the onboarding link after it has expired
Example:
"https://myapp.com/quickbooks-setup-callback"
Response
Onboarding URL regenerated successfully. The full connection object is returned, with updated links.onboarding URL.
Show child attributes
Show child attributes
⌘I

