Skip to main content

This may have been asked already.  I have been working in the APIs for PWS with no issue.  Moving over to SRA, I cannot get the connection to work.  Tells me it is not allowed.  I have the account and API client/secret encoded.  I am using Powershell and tried it with/without the -Method POST option.  My code is 

$AuthKey = "Basic MyBase64Key"

$AuthURI = "https://OURSITE.beyondtrustcloud.com/oauth2/token"

$headers = @{ Authorization=$AuthKey}

$Response = Invoke-RestMethod -URI $AuthURI -Header $headers

What in the name of the sake of sanity am I missing?  Once I get this I know the rest falls into place.

 

TIA

Hello ​@tsipes - We have the API testing steps outlined in the guide here: https://docs.beyondtrust.com/rs/reference/test-scenario - one part I can see which seems to be missing from your code above is ‘--data "grant_type=client_credentials" , I don’t see that line being called.

Please let us kow how you get on!


Reply