![]() $oAuthParamsForSigning.Add("oauth_signature_method",$netsuiteParameters.oauth_signature_method) $oAuthParamsForSigning.Add("oauth_token",$netsuiteParameters.oauth_token) $oAuthParamsForSigning.Add("oauth_consumer_key",$netsuiteParameters.oauth_consumer_key) $oAuthParamsForSigning.Add("oauth_timestamp",$oauth_timestamp) $oAuthParamsForSigning = standard oAuth 1.0 parameters $oauth_timestamp = ((::UtcNow)-(Get-Date "")).TotalSeconds Public class TrustAllCertsPolicy : ICertificatePolicy Kevmaitland script/function… add-type System.Net ![]() Although I could totally be missing something.ĭoes anyone have any insight to what I’m potentially doing wrong? Or why it magically works out of Postman? I’ve spent a stupid amount of time on this. This leads me to believe that I have an URL encoding/header signature problem when trying to use these queries. ![]() Out of Postman the querying does work with both space characters and the “+” character… $response = Invoke-RestMethod -Uri $URLVar -Method 'GET' -Headers $headers Using Postman/My script $URLVar=' IS true' Or Invoke-netsuiteRestMethod -requestType get -url ' IS true' Using kevmaitland’s functions… Invoke-netsuiteRestMethod -requestType get -url When checking the Advanced Login Audit Trail Search in the NetSuite UI there is an "InvalidSignature" under the detail column. However, when I try to add querying (like below) to the URI I get a 401 Unauthorized error in my shell. And the other I commandeered out of Postman with the help of PSAuth.īoth PowerShell scripts do work with the listing of all record instances and individual records, for example… GET I do have two working scripts (via PowerShell) one that I’ve borrowed from the user kevmaitland here and here (thank you tremendously kevmaitland for this!).
0 Comments
Leave a Reply. |