Skip to content

Commit d588487

Browse files
Updating Auth due to CSP API changes
1 parent a79019a commit d588487

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shell/vmc_sddc_summary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ REFRESH_TOKEN=$1
1515
ORGID=$2
1616
SDDCID=$3
1717

18-
RESULTS=$(curl -s -X POST -H "Content-Type: application/json" -H "csp-auth-token: ${REFRESH_TOKEN}" "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token=${REFRESH_TOKEN}")
18+
RESULTS=$(curl -s -X POST -H "application/x-www-form-urlencoded" "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize" -d "refresh_token=$REFRESH_TOKEN")
1919
CSP_ACCESS_TOKEN=$(echo $RESULTS | jq -r .access_token)
2020

2121
RESULTS=$(curl -s -X GET -H "Content-Type: application/json" -H "csp-auth-token: ${CSP_ACCESS_TOKEN}" "https://vmc.vmware.com/vmc/api/orgs/${ORGID}/sddcs/${SDDCID}")

0 commit comments

Comments
 (0)