Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

VB.NET Web API Examples

Primary Categories

ABN AMRO
AWS Translate
Activix CRM
Adyen
Amazon DynamoDB
Amazon MWS
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Bitfinex v2 REST
Bluzone
CallRail
CardConnect
ClickBank
Clickatell
Cloudfare
DocuSign
ETrade
Etsy
Facebook
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Hungary NAV Invoicing
IBM Text to Speech
Jira
Lightspeed

MYOB
Magento
MercadoLibre
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Okta OAuth/OIDC
OneLogin OIDC
PayPal
Peoplevox
Populi
QuickBooks
Rabobank
SOAP finkok.com
Shippo
Shopify
SimpleTexting
Square
Stripe
SugarCRM
Trello
Twilio
Twitter
VoiceBase
Vonage
Walmart
Walmart v3
WhatsApp
WiX
WooCommerce
Xero
Yousign
_Miscellaneous_
eBay
effectconnect

 

 

 

(VB.NET) Update an Inventory Listing using OAuth1 Authentication

Updates an inventory listing. This example uses OAuth1 authentication instead of providing an api_key=MY_ETSY_KEYSTRING query parameter.

Chilkat .NET Downloads

Chilkat .NET Assemblies

Chilkat for .NET Core

Chilkat for Mono

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

Dim rest As New Chilkat.Rest
Dim success As Boolean


Dim oauth1 As New Chilkat.OAuth1

oauth1.ConsumerKey = "CONSUMERKEY"
oauth1.ConsumerSecret = "CONSUMERSECRET"
oauth1.Token = "TOKEN"
oauth1.TokenSecret = "TOKENSECRET"
oauth1.SignatureMethod = "HMAC-SHA1"
oauth1.GenNonce(16)

Dim autoReconnect As Boolean = True
Dim tls As Boolean = True
success = rest.Connect("openapi.etsy.com",443,tls,autoReconnect)
If (success = False) Then
    Debug.WriteLine(rest.LastErrorText)
    Exit Sub
End If


' Tell the REST object to use the OAuth1 object.
success = rest.SetAuthOAuth1(oauth1,True)

Dim jsonText As String = "[{""product_id"":1999949999,""property_values"":[],""offerings"":[{""offering_id"":9999905883,""price"":""36.23"",""quantity"":1}]}]"

rest.AddQueryParam("products",jsonText)
rest.AddHeader("Content-Type","application/x-www-form-urlencoded")

Dim jsonResponseText As String = rest.FullRequestFormUrlEncoded("PUT","/v2/listings/228827035/inventory")
If (rest.LastMethodSuccess = False) Then
    Debug.WriteLine(rest.LastErrorText)
    Exit Sub
End If



Dim jsonResponse As New Chilkat.JsonObject
jsonResponse.Load(jsonResponseText)
jsonResponse.EmitCompact = False

Debug.WriteLine(jsonResponse.Emit())

Debug.WriteLine("Response status code: " & rest.ResponseStatusCode)

 

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