HubSpot
Issues a short-lived, HubSpot-scoped Kiflo access token.
Called by a HubSpot App Card through hubspot.fetch, which appends portalId
and signs the request. The signature proves the request originates from HubSpot.
GET
/
v3
/
hubspot
/
access-token
Issues a short-lived, HubSpot-scoped Kiflo access token.
curl --request GET \
--url https://api.example.com/v3/hubspot/access-tokenimport requests
url = "https://api.example.com/v3/hubspot/access-token"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v3/hubspot/access-token', 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.example.com/v3/hubspot/access-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v3/hubspot/access-token"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v3/hubspot/access-token")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/hubspot/access-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"accessToken": "<string>",
"expiresInSeconds": 123,
"accountId": 123,
"permissions": [
"DealView"
]
}Response
A short-lived access token was issued.
The features relevant to the HubSpot app that the user this token was issued for actually holds. Lets the app leave out an action the user would only be refused, and never grants anything: each endpoint still enforces its own policy.
Available options:
DealView, DealCreate, DealUpdate, DealDelete, DealUpdateStage, DealViewTotalAmount, DealRequestQuote, DealSetupChannelConflictsDetection, DealPartnerRoleView, DealPartnerRoleCreate, DealPartnerRoleUpdate, DealPartnerRoleAssign, DealPartnerRoleDelete, LeadView, LeadCreate, LeadUpdate, LeadDelete, LeadShare, LeadAccept, LeadRefuse, LeadConvert, LeadAbandon, LeadSetupChannelConflictsDetection, DealValidate, BusinessPlanCreate, BusinessPlanUpdate, BusinessPlanView, BusinessPlanDelete, BusinessPlanActivityCreate, BusinessPlanActivityUpdate, BusinessPlanActivityView, BusinessPlanActivityDelete, ProgramView, ProgramCreate, ProgramUpdate, ProgramDelete, ProgramLevelView, ProgramLevelCreate, ProgramLevelUpdate, ProgramLevelDelete, CertificationView, CertificationCreate, CertificationUpdate, CertificationDelete, TransactionView, TransactionCreate, TransactionUpdate, TransactionDelete, CustomerView, CustomerCreate, CustomerUpdate, CustomerDelete, NewsView, NewsCreate, NewsUpdate, NewsDelete, ExportCreate, CollectionView, CollectionCreate, CollectionUpdate, CollectionDelete, ArticleView, ArticleCreate, ArticleUpdate, ArticleDelete, IntegrationView, IntegrationCreate, IntegrationUpdate, IntegrationDelete, IntegrationSalesforce, PayoutView, PayoutCreate, PayoutUpdate, PayoutDelete, PayoutValidate, PayoutAccept, PayoutPay, PayoutExport, PayoutGet, PayoutSetupAutomaticCreation, LinkCreate, LinkUpdate, LinkView, LinkDelete, RewardDelete, RewardView, RewardValidate, RewardCreate, ProductView, ProductCreate, ProductUpdate, ProductDelete, ProductPriceView, ProductPriceCreate, ProductPriceUpdate, ProductPriceDelete, LineItemView, LineItemCreate, LineItemUpdate, LineItemDelete, TaskView, TaskCreate, TaskUpdate, TaskDelete, AccountDataReset, AccountDataInsert, AccountTenantSettingsUpdate, AccountSetupSSO, AccountPartnerSettingsUpdate, AccountSetupMfa, TeamMemberView, TeamMemberCreate, TeamMemberUpdate, TeamMemberDelete, PartnerView, PartnerCreate, PartnerUpdate, PartnerDelete, PartnerImpersonate, PartnerApplicationAccept, PartnerApplicationReject, GroupView, GroupCreate, GroupUpdate, GroupDelete, AssetView, AssetCreate, AssetUpdate, AssetDelete, AssetMove, AssetCobrandedView, AssetCobrandedCreate, CoworkerView, CoworkerCreate, CoworkerUpdate, CoworkerDelete, CoworkerAssignOwnerRole, CoworkerAssignAdminRole, CoworkerAssignUserRole, CoworkerAssignViewerRole, EmailTemplateView, EmailTemplateCreate, EmailTemplateUpdate, EmailTemplateDelete, DashboardView, DashboardCreate, DashboardUpdate, DashboardDelete, ViewCreateShared, TeamMemberCertificationView, TeamMemberCertificationCreate, TeamMemberCertificationUpdate, TeamMemberCertificationDelete, OnboardingView, OnboardingCreate, OnboardingUpdate, OnboardingDelete, OnboardingStageActionCreate, OnboardingStageActionUpdate, OnboardingStageActionChangeStatus, OnboardingStageActionDelete, OnboardingStageActionView, CommentCreate, CommentUpdate, CommentDelete, CommentView, WorkflowCreate, WorkflowUpdate, WorkflowUpdateStatus, WorkflowManageEnrollments, WorkflowDelete, WorkflowView, MeetingView, MeetingCreate, MeetingUpdate, MeetingDelete, NoteView, NoteCreate, NoteUpdate, NoteDelete, AttachmentView, AttachmentCreate, AttachmentDelete, BillingManage, EmailSend, DirectoryView, DirectoryCreate, DirectoryUpdate, DirectoryDelete, DirectoryProfileView, DirectoryProfileCreate, DirectoryProfileUpdate, DirectoryProfileDelete, SelfInvoicingView, SelfInvoicingManage, AccountMappingDataSourceView, AccountMappingDataSourceCreate, AccountMappingDataSourceUpdate, AccountMappingDataSourceDelete, AccountMappingAccountView, AccountMappingOverlapExport, AccountMappingCollaborationView, AccountMappingCollaborationCreate, AccountMappingCollaborationUpdate, AccountMappingCollaborationDelete, AccountMappingCollaborationRequestCreate, AddonCustomDomain, AddonPartnerDirectory Issues a short-lived, HubSpot-scoped Kiflo access token.
curl --request GET \
--url https://api.example.com/v3/hubspot/access-tokenimport requests
url = "https://api.example.com/v3/hubspot/access-token"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v3/hubspot/access-token', 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.example.com/v3/hubspot/access-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v3/hubspot/access-token"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v3/hubspot/access-token")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/hubspot/access-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"accessToken": "<string>",
"expiresInSeconds": 123,
"accountId": 123,
"permissions": [
"DealView"
]
}
