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

Xojo Plugin 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

 

 

 

(Xojo Plugin) Docusign: Return Brand Data Associated with a User

Demonstrates a call using an OAuth2 access token in combination with the account ID for which we have authorization.

For more information, see https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-jsonwebtoken

Chilkat Xojo Plugin Download

Xojo Plugin for Windows, Linux, Mac OS X, and ARM, ARM64

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

Dim http As New Chilkat.Http
Dim success As Boolean

// Implements the following CURL command:

// curl --request GET https://account-d.docusign.com/restapi/v2/accounts/18b4799a-xxxx-xxxx-xxxx-b5b4b8a97604/brands --header "Authorization: Bearer eyJ0eXAi.....UE8Kl_V8KroQ"

// 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 eyJ0eXAi.....UE8Kl_V8KroQ" header.
Dim jsonToken As New Chilkat.JsonObject
// Load a previously obtained OAuth2 access token.
success = jsonToken.LoadFile("qa_data/tokens/docusign.json")
If (success = False) Then
    System.DebugLog(jsonToken.LastErrorText)
    Return
End If

http.AuthToken = jsonToken.StringOf("access_token")

// Use an account ID obtained from DocuSign Get User Account Data
Dim sbResponseBody As New Chilkat.StringBuilder
success = http.QuickGetSb("https://account-d.docusign.com/restapi/v2/accounts/18b4799a-xxxx-xxxx-xxxx-b5b4b8a97604/brands",sbResponseBody)
If (success = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

Dim json As New Chilkat.JsonObject
success = json.LoadSb(sbResponseBody)
json.EmitCompact = False

System.DebugLog("Response Body:")
System.DebugLog(json.Emit())

Dim respStatusCode As Int32
respStatusCode = http.LastStatus
System.DebugLog("Response Status Code = " + Str(respStatusCode))
If (respStatusCode >= 400) Then
    System.DebugLog("Response Header:")
    System.DebugLog(http.LastHeader)
    System.DebugLog("Failed.")
    Return
End If

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

// {
//   "recipientBrandIdDefault": "sample string 1",
//   "senderBrandIdDefault": "sample string 2",
//   "brands": [
//     {
//       "brandCompany": "sample string 1",
//       "brandId": "sample string 2",
//       "brandName": "sample string 3",
//       "colors": [
//         {}
//       ],
//       "errorDetails": {
//         "errorCode": "sample string 1",
//         "message": "sample string 2"
//       },
//       "isOverridingCompanyName": "sample string 4",
//       "isSendingDefault": "sample string 5",
//       "isSigningDefault": "sample string 6",
//       "landingPages": [
//         {}
//       ],
//       "links": [
//         {
//           "linkType": "sample string 1",
//           "urlOrMailTo": "sample string 2",
//           "linkText": "sample string 3",
//           "showLink": "sample string 4"
//         }
//       ],
//       "emailContent": [
//         {
//           "emailContentType": "sample string 1",
//           "content": "sample string 2",
//           "emailToLink": "sample string 3",
//           "linkText": "sample string 4"
//         }
//       ],
//       "logos": {
//         "primary": "sample string 1",
//         "secondary": "sample string 2",
//         "email": "sample string 3"
//       },
//       "resources": {
//         "email": "sample string 1",
//         "sending": "sample string 2",
//         "signing": "sample string 3",
//         "signingCaptive": "sample string 4"
//       }
//     }
//   ]
// }

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

Dim brandCompany As String
Dim brandId As String
Dim brandName As String
Dim errorDetailsErrorCode As String
Dim errorDetailsMessage As String
Dim isOverridingCompanyName As String
Dim isSendingDefault As String
Dim isSigningDefault As String
Dim logosPrimary As String
Dim logosSecondary As String
Dim logosEmail As String
Dim resourcesEmail As String
Dim resourcesSending As String
Dim resourcesSigning As String
Dim resourcesSigningCaptive As String
Dim j As Int32
Dim count_j As Int32
Dim linkType As String
Dim urlOrMailTo As String
Dim linkText As String
Dim showLink As String
Dim emailContentType As String
Dim content As String
Dim emailToLink As String

Dim recipientBrandIdDefault As String
recipientBrandIdDefault = json.StringOf("recipientBrandIdDefault")
Dim senderBrandIdDefault As String
senderBrandIdDefault = json.StringOf("senderBrandIdDefault")
Dim i As Int32
i = 0
Dim count_i As Int32
count_i = json.SizeOfArray("brands")
While i < count_i
    json.I = i
    brandCompany = json.StringOf("brands[i].brandCompany")
    brandId = json.StringOf("brands[i].brandId")
    brandName = json.StringOf("brands[i].brandName")
    errorDetailsErrorCode = json.StringOf("brands[i].errorDetails.errorCode")
    errorDetailsMessage = json.StringOf("brands[i].errorDetails.message")
    isOverridingCompanyName = json.StringOf("brands[i].isOverridingCompanyName")
    isSendingDefault = json.StringOf("brands[i].isSendingDefault")
    isSigningDefault = json.StringOf("brands[i].isSigningDefault")
    logosPrimary = json.StringOf("brands[i].logos.primary")
    logosSecondary = json.StringOf("brands[i].logos.secondary")
    logosEmail = json.StringOf("brands[i].logos.email")
    resourcesEmail = json.StringOf("brands[i].resources.email")
    resourcesSending = json.StringOf("brands[i].resources.sending")
    resourcesSigning = json.StringOf("brands[i].resources.signing")
    resourcesSigningCaptive = json.StringOf("brands[i].resources.signingCaptive")
    j = 0
    count_j = json.SizeOfArray("brands[i].colors")
    While j < count_j
        json.J = j
        j = j + 1
    Wend
    j = 0
    count_j = json.SizeOfArray("brands[i].landingPages")
    While j < count_j
        json.J = j
        j = j + 1
    Wend
    j = 0
    count_j = json.SizeOfArray("brands[i].links")
    While j < count_j
        json.J = j
        linkType = json.StringOf("brands[i].links[j].linkType")
        urlOrMailTo = json.StringOf("brands[i].links[j].urlOrMailTo")
        linkText = json.StringOf("brands[i].links[j].linkText")
        showLink = json.StringOf("brands[i].links[j].showLink")
        j = j + 1
    Wend
    j = 0
    count_j = json.SizeOfArray("brands[i].emailContent")
    While j < count_j
        json.J = j
        emailContentType = json.StringOf("brands[i].emailContent[j].emailContentType")
        content = json.StringOf("brands[i].emailContent[j].content")
        emailToLink = json.StringOf("brands[i].emailContent[j].emailToLink")
        linkText = json.StringOf("brands[i].emailContent[j].linkText")
        j = j + 1
    Wend
    i = i + 1
Wend

 

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