<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting Started with Cisco APIs in Services Discussions</title>
    <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4938089#M1054</link>
    <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1585931"&gt;@emares&lt;/a&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Register your application and obtain your client credentials, your client ID and client secret.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 13:20:42 GMT</pubDate>
    <dc:creator>bigevilbeard</dc:creator>
    <dc:date>2023-10-11T13:20:42Z</dc:date>
    <item>
      <title>Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517540#M850</link>
      <description>&lt;P&gt;Trying this for the first time:&lt;/P&gt;&lt;P&gt;1- I created My Apps &amp;amp; Keys&lt;/P&gt;&lt;P&gt;2- Setup everything in Postman.&lt;/P&gt;&lt;P&gt;3- This is basically my code:&lt;/P&gt;&lt;PRE&gt;import requests

url = "https://cloudsso2.cisco.com/as/token.oauth2"

payload='response_type=code&amp;amp;grant_type=client_credentials&amp;amp;client_id=THIS IS THE KEY&amp;amp;client_secret=THIS IS THE SECRET'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
  'Cookie': 'PF=xxxxxxxx
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)&lt;/PRE&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;PRE&gt;{
    "error_description": "Invalid client or client credentials.",
    "error": "invalid_client"
}&lt;/PRE&gt;&lt;P&gt;What am I missing here; isn't "KEY" = client_id?&amp;nbsp; Or is that a different value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quick update: I deleted it app, recreated it and now I'm getting this:&lt;/P&gt;&lt;PRE&gt;{
    "error": "unauthorized_client"
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Dec 2021 22:37:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517540#M850</guid>
      <dc:creator>vs_cisco</dc:creator>
      <dc:date>2021-12-12T22:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517552#M851</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;You need to pass the client_id and client_secret in the header. The request should look like:&lt;/P&gt;
&lt;PRE&gt;response = requests.post(url, verify=False, data={"grant_type": "client_credentials"},
                             headers={"Content-Type": "application/x-www-form-urlencoded"},
                             params={"client_id": API_TOKEN_CLIENT_ID, "client_secret": API_TOKEN_CLIENT_PASS})&lt;/PRE&gt;
&lt;P&gt;I wrote a blog post here which may help: &lt;A href="http://cs7networks.co.uk/2019/07/12/interacting-with-cisco-apis/" target="_blank"&gt;http://cs7networks.co.uk/2019/07/12/interacting-with-cisco-apis/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Seb.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Dec 2021 23:10:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517552#M851</guid>
      <dc:creator>Seb Rupik</dc:creator>
      <dc:date>2021-12-12T23:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517909#M852</link>
      <description>&lt;P&gt;Still not working, tried to follow your blog instructions but keep getting 'unauthorized_client' or some other message.&amp;nbsp; That is what I thought that these should be sent in the header but Cisco docs confused me a bit.&amp;nbsp; Any ways I tried sending everything in the header and same results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import requests

url = "https://cloudsso.cisco.com/as/token.oauth2"

payload = {}
headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
  'Cookie': 'PF=lKxxxxxxx',
  'grant_type': 'client_credentials',
  'client_id': 'xxxxxxxxxxxxx',
  'client_secret': 'vvvvvvvvvvvvvv'
}

response = requests.post(url, headers=headers, data=payload)

print(response.text)&lt;/PRE&gt;&lt;P&gt;I get this:&lt;/P&gt;&lt;PRE&gt;{"error_description":"grant_type is required","error":"invalid_request"}&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Dec 2021 13:48:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517909#M852</guid>
      <dc:creator>vs_cisco</dc:creator>
      <dc:date>2021-12-13T13:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517932#M853</link>
      <description>&lt;P&gt;What API are you trying to access? If it is sometyhing on the Cisco API Console, have to registered for access?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Seb.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 14:30:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517932#M853</guid>
      <dc:creator>Seb Rupik</dc:creator>
      <dc:date>2021-12-13T14:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517949#M854</link>
      <description>&lt;P&gt;Cisco PSIRT openVuln API: Cisco PSIRT openVuln API&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I haven't really gotten that far yet.&amp;nbsp; I can't even generate a token using the script.&amp;nbsp; Little more progress:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;InsecureRequestWarning: Unverified HTTPS request is being made to host 'cloudsso.cisco.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Dec 2021 14:47:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517949#M854</guid>
      <dc:creator>vs_cisco</dc:creator>
      <dc:date>2021-12-13T14:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517996#M855</link>
      <description>&lt;P&gt;The PSIRT openVuln API used to be available to everyone, but at some point cisco restricted access. It doesn't even show up when I browse for it under available APIs, but thankfully I still have access. I would check if you can access the API before you go any further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can suppress that warning with the following:&lt;/P&gt;
&lt;PRE&gt;requests.packages.urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)&lt;/PRE&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Seb.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 15:54:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517996#M855</guid>
      <dc:creator>Seb Rupik</dc:creator>
      <dc:date>2021-12-13T15:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517997#M856</link>
      <description>&lt;P&gt;Thanks, I will try that.&amp;nbsp; I need to go through all that token generation process just to get information on EoL stuff?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 15:56:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4517997#M856</guid>
      <dc:creator>vs_cisco</dc:creator>
      <dc:date>2021-12-13T15:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4518024#M857</link>
      <description>&lt;P&gt;Sadly yes. When you get it working it is a sweet solution. An alternative I have considered (but not got very far on) is to hoover up the details &lt;A href="https://tools.cisco.com/security/center/cvrfListing.x" target="_blank"&gt;https://tools.cisco.com/security/center/publicationListing.x&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here it is: &lt;A href="https://github.com/sebrupik/endlessninth/blob/master/cvrf_scape.py" target="_blank"&gt;https://github.com/sebrupik/endlessninth/blob/master/cvrf_scape.py&lt;/A&gt;&amp;nbsp;&amp;nbsp; ... feel free to make a pull request!! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Seb.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 16:22:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4518024#M857</guid>
      <dc:creator>Seb Rupik</dc:creator>
      <dc:date>2021-12-13T16:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4518103#M858</link>
      <description>&lt;P&gt;Whew man this is rough.&amp;nbsp; I have worked with few other vendor APIs and they are just so much easier.&amp;nbsp; Just generating an API token is a night mare with Cisco.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have been able to get rid of the "verification error" and back to "unauthorized_client".&lt;/P&gt;&lt;PRE&gt;import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
url = 'https://cloudsso.cisco.com/as/token.oauth2'
CLIENT_ID = '22222222222'
CLIENT_PASS = '33333333333333'

headers = {"Content-Type": "application/x-www-form-urlencoded"
           }

payload = {"client_id": CLIENT_ID,
           "client_secret": CLIENT_PASS,
           "grant_type": "client_credentials"
           }

response = requests.post(url,headers=headers, data=payload)
print(response.text)&lt;/PRE&gt;&lt;P&gt;I see the payload data includes all the required values and I have the client_id and client_secret from under My Apps and Keys.&amp;nbsp; What am I doing wrong?&lt;/P&gt;&lt;PRE&gt;{"error":"unauthorized_client"}&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Dec 2021 18:29:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4518103#M858</guid>
      <dc:creator>vs_cisco</dc:creator>
      <dc:date>2021-12-13T18:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4518480#M859</link>
      <description>&lt;P&gt;The client id and client secret must be passed as parameters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;payload = {"grant_type": "client_credentials"}&lt;BR /&gt;headers_d = {"Content-Type": "application/x-www-form-urlencoded"}&lt;BR /&gt;params_d = {"client_id": CLIENT_ID, &lt;BR /&gt;            "client_secret": CLIENT_PASS}&lt;BR /&gt;&lt;BR /&gt;response = requests.post(url, verify=False, data=payload, headers=headers_d, params=params_d)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Seb&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 10:10:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4518480#M859</guid>
      <dc:creator>Seb Rupik</dc:creator>
      <dc:date>2021-12-14T10:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4936999#M1053</link>
      <description>&lt;P&gt;Did you find an answer for this question?&lt;/P&gt;&lt;P&gt;"What am I missing here; isn't "KEY" = client_id?&amp;nbsp; Or is that a different value?"&lt;/P&gt;&lt;P&gt;I don't quite understand where to get the client id from.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 08:00:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4936999#M1053</guid>
      <dc:creator>emares</dc:creator>
      <dc:date>2023-10-10T08:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4938089#M1054</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1585931"&gt;@emares&lt;/a&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Register your application and obtain your client credentials, your client ID and client secret.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 13:20:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/4938089#M1054</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-10-11T13:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Started with Cisco APIs</title>
      <link>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/5336446#M1252</link>
      <description>&lt;P&gt;Thanks a lot for this example!!!! Finally I was able to generate my token!!!!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2025 08:57:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/getting-started-with-cisco-apis/m-p/5336446#M1252</guid>
      <dc:creator>a.mitsova</dc:creator>
      <dc:date>2025-10-07T08:57:16Z</dc:date>
    </item>
  </channel>
</rss>

