cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
110
Views
0
Helpful
1
Replies

FMC CURL generatetoken error

Hi everybody,

I'm trying to generate a token and I'm getting the following error message.

curl -k -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"grant_type": "password","username": "api", "password": "password"}' 'https://<ip_address>/api/fmc_platform/v1/auth/generatetoken'

{"error":{"category":"FRAMEWORK","messages":[{"description":"User authentication failed."}],"severity":"ERROR"}}%

Does somebody know how can I fix this?

Thanks

1 Accepted Solution

Accepted Solutions

You mostly likey problem is you are using the wrong authentication method, https://www.cisco.com/c/en/us/support/docs/security/firepower-management-center/215918-how-to-generate-authentication-token-for.html - unless this has changed since this document. From the doc, FMC API expects Basic Authentication (username:password encoded in Base64) rather than a JSON payload.

Try

curl -k -X POST --header 'Authorization: [insert here]' 'https://<ip_address>/api/fmc_platform/v1/auth/generatetoken'

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

1 Reply 1

You mostly likey problem is you are using the wrong authentication method, https://www.cisco.com/c/en/us/support/docs/security/firepower-management-center/215918-how-to-generate-authentication-token-for.html - unless this has changed since this document. From the doc, FMC API expects Basic Authentication (username:password encoded in Base64) rather than a JSON payload.

Try

curl -k -X POST --header 'Authorization: [insert here]' 'https://<ip_address>/api/fmc_platform/v1/auth/generatetoken'

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io