Missing authentication token needed in the API to use with OAuth access
5465
Created On 03/25/24 15:39 PM - Last Modified 04/03/24 20:55 PM
Symptom
- OAuth client credentials generated which is required to manage PA-VM-FLEX deployment profiles.
- Although Client ID and Secret Key is generated, the information of authentication token is missing.
- Authentication token is needed in the API to retrieve information about the credit pools.
- Example: To retrieve info about all credit pools in your CSP account:
curl --location --request GET 'https://api.paloaltonetworks.com/tms/v1/creditPool' \
--header 'token: <your-token>'Environment
- PA-VM-FLEX
- OAuth Client Credentials generated in the Customer Support Portal (CSP)'
- Authentication token
Cause
Authentication token need to be generated.
Resolution
- Use the following API key to the OAUth Endpoint to generate the token to use with the API requests
curl --location 'https://identity.paloaltonetworks.com/as/token.oauth2' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=yourClientId’ \
--data-urlencode 'client_secret=yourSecret’ \
--data-urlencode 'scope=fwflex-service' \
--data-urlencode 'grant_type=client_credentials'
- Now use the generated token in the CLI command to get the information about credit pools.
curl --location --request GET 'https://api.paloaltonetworks.com/tms/v1/creditPool' \
--header 'token: <your-token>'Additional Information
Other API requests for managing the credit pools