Cybersecurity Forum

This forum is for all security enthusiasts to discuss Fortinet's latest & evolving technologies and to connect & network with peers in the cybersecurity hemisphere. Share and learn on a broad range of topics like best practices, use cases, integrations and more. For support specific questions/resources, please visit the Support Forum or the Knowledge Base.

andrewm659
New Contributor

generating API keys

I am trying to generate an API key for a local user on my Fortigate 60D running version 6.2.7.  I am trying to monitor this with prometheus and grafana but keep getting access denied.  I am using the fortigate_exporter to monitor this.
[ameyer@mon001 ~]$ curl -ilk https://192.168.1.1:7443/api/v2/cmdb/firewall/address?vdom=root&access_token=
[1] 2487587
[ameyer@mon001 ~]$ HTTP/1.1 401 Unauthorized
Date: Mon, 10 May 2021 19:22:34 GMT
Server: Apache
Content-Length: 503
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<p>Additionally, a 401 Unauthorized
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

[1]+  Done                    curl -ilk https://10.150.1.1:7443/api/v2/cmdb/firewall/address?vdom=root
[ameyer@mon001 ~]$
Not sure what I am doing wrong.
0 REPLIES 0
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.