Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

Tcl Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(Tcl) Frame.io - Get Account ID

Make a GET /me request if you don't have your Account ID on hand:

For more information, see https://docs.frame.io/docs/root-asset-ids

Chilkat Tcl Extension Downloads

Chilkat Tcl Extension Downloads

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

# Implements the following CURL command:

# curl \
#     -H "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" \
#     https://api.frame.io/v2/me

# Use the following online tool to generate HTTP code from a CURL command
# Convert a cURL Command to HTTP Source Code

# Adds the "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" header.
CkHttp_put_AuthToken $http "<FRAME_IO_DEV_TOKEN>"

set sbResponseBody [new_CkStringBuilder]

set success [CkHttp_QuickGetSb $http "https://api.frame.io/v2/me" $sbResponseBody]
if {$success == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkStringBuilder $sbResponseBody
    exit
}

set jResp [new_CkJsonObject]

CkJsonObject_LoadSb $jResp $sbResponseBody
CkJsonObject_put_EmitCompact $jResp 0

puts "Response Body:"
puts [CkJsonObject_emit $jResp]

set respStatusCode [CkHttp_get_LastStatus $http]
puts "Response Status Code = $respStatusCode"
if {$respStatusCode >= 400} then {
    puts "Response Header:"
    puts [CkHttp_lastHeader $http]
    puts "Failed."
    delete_CkHttp $http
    delete_CkStringBuilder $sbResponseBody
    delete_CkJsonObject $jResp
    exit
}

# Sample JSON response:
# (Sample code for parsing the JSON response is shown below)

# {
#   "_type": "user",
#   "account_id": "b1cd046b-a3bf-4ef8-81a6-0afd74ecc455",
#   "bio": null,
#   "context": null,
#   "deleted_at": null,
#   "digest_frequency": "*/5 * * * *",
#   "email": "admin@chilkatsoft.com",
#   "email_confirm_by": null,
#   "email_preferences": null,
#   "features_seen": null,
#   "first_login_at": "2020-08-18T02:20:56.732000Z",
#   "from_google": false,
#   "id": "34b4f98a-7cc9-4159-8f46-c7c3d837fc6f",
#   "image_128": null,
#   "image_256": null,
#   "image_32": null,
#   "image_64": null,
#   "inserted_at": "2020-08-18T02:20:13.145929Z",
#   "joined_via": "organic",
#   "last_seen": "2020-08-18T02:20:52.852871Z",
#   "location": null,
#   "name": "Chilkat Software",
#   "next_digest_date": "2020-08-18T02:20:13.145828Z",
#   "phone": null,
#   "profile_image": "https://static-assets.frame.io/app/anon.jpg",
#   "profile_image_original": null,
#   "roles": null,
#   "timezone_value": "America/New_York",
#   "updated_at": "2020-08-18T02:20:56.950455Z",
#   "upload_url": "https://frameio-uploads-production.s3-accelerate.amazonaws.com/users/34b4f...cdcfe42b2e2f",
#   "user_default_color": "#ff40ff",
#   "user_hash": "1D39653455C86A85CA3D479C6D2ACE831211BC1B65770DF3747116DD320C3A00"
# }

# Sample code for parsing the JSON response...
# Use the following online tool to generate parsing code from sample JSON:
# Generate Parsing Code from JSON

set v_type [CkJsonObject_stringOf $jResp "_type"]
set account_id [CkJsonObject_stringOf $jResp "account_id"]
set bio [CkJsonObject_stringOf $jResp "bio"]
set context [CkJsonObject_stringOf $jResp "context"]
set deleted_at [CkJsonObject_stringOf $jResp "deleted_at"]
set digest_frequency [CkJsonObject_stringOf $jResp "digest_frequency"]
set email [CkJsonObject_stringOf $jResp "email"]
set email_confirm_by [CkJsonObject_stringOf $jResp "email_confirm_by"]
set email_preferences [CkJsonObject_stringOf $jResp "email_preferences"]
set features_seen [CkJsonObject_stringOf $jResp "features_seen"]
set first_login_at [CkJsonObject_stringOf $jResp "first_login_at"]
set from_google [CkJsonObject_BoolOf $jResp "from_google"]
set id [CkJsonObject_stringOf $jResp "id"]
set image_128 [CkJsonObject_stringOf $jResp "image_128"]
set image_256 [CkJsonObject_stringOf $jResp "image_256"]
set image_32 [CkJsonObject_stringOf $jResp "image_32"]
set image_64 [CkJsonObject_stringOf $jResp "image_64"]
set inserted_at [CkJsonObject_stringOf $jResp "inserted_at"]
set joined_via [CkJsonObject_stringOf $jResp "joined_via"]
set last_seen [CkJsonObject_stringOf $jResp "last_seen"]
set location [CkJsonObject_stringOf $jResp "location"]
set name [CkJsonObject_stringOf $jResp "name"]
set next_digest_date [CkJsonObject_stringOf $jResp "next_digest_date"]
set phone [CkJsonObject_stringOf $jResp "phone"]
set profile_image [CkJsonObject_stringOf $jResp "profile_image"]
set profile_image_original [CkJsonObject_stringOf $jResp "profile_image_original"]
set roles [CkJsonObject_stringOf $jResp "roles"]
set timezone_value [CkJsonObject_stringOf $jResp "timezone_value"]
set updated_at [CkJsonObject_stringOf $jResp "updated_at"]
set upload_url [CkJsonObject_stringOf $jResp "upload_url"]
set user_default_color [CkJsonObject_stringOf $jResp "user_default_color"]
set user_hash [CkJsonObject_stringOf $jResp "user_hash"]

delete_CkHttp $http
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $jResp

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.