Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you invoke rest method powershell to get access token

I'm trying to create a small powershell script to invoke a rest-method to get an access token. I was able to figure out how to use thunder client to get the data I need in a get request, but don't know how to translate that information into a powershell command.

Info is as follows in thunder client to generate a new token:

Grant Type: Client Credentials
Token URL: {{token_url}}
clientID: {clinet_ID}}
clientSecret: {client_secret}}
scope: {{scope}}
send Auth: As Auth Header

In powershell?

like image 754
user13696433 Avatar asked May 16 '26 14:05

user13696433


1 Answers

Hi I am creator of Thunder Client, since you already using the extension, you can use Code Snippet feature to generate PowerShell code

Enter Client ID, Client secret in Basic Auth Tab, and enter other values as shown in image below.

Thunder Client Powershell code snippet

like image 61
Ranga Vadhineni Avatar answered May 18 '26 14:05

Ranga Vadhineni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!