I think I have something wrong with the formatting of the body. this is my code and my error
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At C:PowerShellTxt_Bulk.ps1:38 char:16
$Token = Get-RingCentralAuthentication
$Bearer = $Token.access_token
$Header = @{"accept" = 'application/json'
"authorization" = "Bearer $Bearer"
}
$AuthAPI = @{"endpoint" = 'https://platform.ringcentral.com'
"url" = '/restapi/v1.0/account/~/a2p-sms/batches' }
$AuthBodyTxt = @{
"from" = '+14085555555'
"text" = 'Hello Team testing API, no need to reply'
"messages" = @{"to" = '+18315555555' }
}
$UriTxt = $AuthAPI.endpoint + $AuthAPI.url
$requesttxt = Invoke-RestMethod -Method Post -Uri $UriTxt -Headers $Header -Body $AuthBodTxt
return $requesttxt