vsphere-automation-sdk-rest icon indicating copy to clipboard operation
vsphere-automation-sdk-rest copied to clipboard

Add Get Access Token sample

Open jrgarcia opened this issue 6 years ago • 2 comments

What this PR does / why we need it:

This sample allows you to get an access token using the OAuth2 client credentials grant type. You create a Server to Server app and get a client ID and client secret. Using these, you can get an access token from the added API call.

This also includes an update to the VMC Environment file for client_id and client_secret.

jrgarcia avatar Jul 31 '19 20:07 jrgarcia

@jobingeo Yes, I tested this and it works fine. There is also a test to ensure that an access token is returned.

jrgarcia avatar Aug 01 '19 05:08 jrgarcia

@jobingeo Ok, I've updated the variable names.

jrgarcia avatar Aug 01 '19 15:08 jrgarcia