The Get-TwitterUsers_Lookup method works fine. But the Send-TwitterDirectMessages_EventsNew errored out with the below. I did configure the app permissions to allow Read + Write + Direct Messages.
Invoke-RestMethod : {"errors":[{"code":215,"message":"Bad Authentication data."}]}
At C:\Program Files\WindowsPowerShell\Modules\PSTwitterAPI\0.0.8\public\Invoke-TwitterAPI.ps1:34 char:5
+ Invoke-RestMethod @RestMethod_Params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExceptio
n
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
WARNING: Throttling for -1626964553.70296 seconds.
Start-Sleep : Cannot validate argument on parameter 'Seconds'. The -1626964554 argument is less than the minimum allowed
range of 0. Supply an argument that is greater than or equal to 0 and then try the command again.
At C:\Program Files\WindowsPowerShell\Modules\PSTwitterAPI\0.0.8\public\Get-TwitterOAuthSettings.ps1:33 char:38
+ Start-Sleep -Seconds $SleepSeconds
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Start-Sleep], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.StartSleepCommand
All APIs have their own script, automatically generated from the documentation from Twitter. But unfortunately, not all the functions/methods/APIs have been fully tested it.
Any idea why I am getting this error calling Send-TwitterDirectMessages_EventsNew?
Code:
The Get-TwitterUsers_Lookup method works fine. But the Send-TwitterDirectMessages_EventsNew errored out with the below. I did configure the app permissions to allow Read + Write + Direct Messages.
Thanks