Skip to content

Instantly share code, notes, and snippets.

@dtkloud
Created April 3, 2019 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dtkloud/b60b2fccdb4b8f404507112d3202bbd4 to your computer and use it in GitHub Desktop.
Save dtkloud/b60b2fccdb4b8f404507112d3202bbd4 to your computer and use it in GitHub Desktop.
$client_key = "<your client key>"
$client_secret = "<your secret>"
$body = "grant_type=client_credentials&client_id=$client_key&client_secret=$client_secret&scope=NSMS"
$Authorization = Invoke-RestMethod "https://tapi.telstra.com/v2/oauth/token" -Method POST -ContentType "application/x-www-form-urlencoded" -Body $body -ErrorAction STOP
$access_token = $Authorization.access_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment