05-26-2025 11:51 AM
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
Solved! Go to Solution.
05-27-2025 02:37 AM
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'
05-27-2025 02:37 AM
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'
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide