Sample code for 30+ languages & platforms
AutoIt

NetSuite OAuth1

See more OAuth1 Examples

Demonstrates adding OAUth1 authentication to a NetSuite REST API request.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

; It requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oHttp = ObjCreate("Chilkat.Http")

$oHttp.OAuth1 = True
$oHttp.OAuthConsumerKey = "CONSUMER_KEY"
$oHttp.OAuthConsumerSecret = "CONSUMER_SECRET"
$oHttp.OAuthToken = "ACCESS_TOKEN"
$oHttp.OAuthTokenSecret = "TOKEN_SECRET"
$oHttp.OAuthRealm = "ACCOUNT_ID"
$oHttp.OAuthSigMethod = "HMAC-SHA256"

; Not sure if this is needed for NetSuite requests.
$oHttp.SetRequestHeader "Cookie","NS_ROUTING_VERSION=LAGGING"

; Replace ACCOUNT_ID with your actual account id, which is likely a 7-digit decimal number.
$oResp = ObjCreate("Chilkat.HttpResponse")
$bSuccess = $oHttp.HttpNoBody("GET","https://ACCOUNT_ID.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder",$oResp)
If ($bSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite("Response Status Code: " & $oResp.StatusCode & @CRLF)
ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)