{"id":649,"date":"2025-05-21T18:58:37","date_gmt":"2025-05-21T16:58:37","guid":{"rendered":"https:\/\/network360.fr\/?p=649"},"modified":"2025-06-20T15:30:29","modified_gmt":"2025-06-20T13:30:29","slug":"obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python","status":"publish","type":"post","link":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/","title":{"rendered":"Obtenir un token d&rsquo;authentification depuis Catalyst Center avec Python"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">L\u2019objectif de ce tutoriel est de r\u00e9cup\u00e9rer automatiquement des informations sur mes switches via les API de Catalyst Center (anciennement DNA Center).<strong> Pour cela, la premi\u00e8re \u00e9tape consiste \u00e0 s\u2019authentifier et obtenir un token d\u2019acc\u00e8s.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Il est relativement simple de faire cet appel API sur Postman. Ici, j&rsquo;ai voulu le faire en python pour pouvoir g\u00e9rer les donn\u00e9es que je r\u00e9cup\u00e9rerai par la suite. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Voici le code : <\/p>\n\n\n<div class=\"wp-block-prettycode-code  \">\n  <header class=\"prettycode-header\">\n    <div class=\"prettycode-lang is-lang-python\">\n      Python    <\/div>\n    <div class=\"prettycode-file\">\n          <\/div>\n  <\/header>\n  <div class=\"prettycode-editor\">\n    <script type=\"application\/json\" class=\"prettycode-data\">{\"source\":\"import requests\\nfrom requests.auth import HTTPBasicAuth\\n\\n# Informations de connexion \\u00e0 ton Cisco DNA Center\\ndnac_url = https:\\\/\\\/10.10.20.90\\nusername = \\\"admin\\\"\\npassword = \\\"Cisco123\\\"\\n\\n# Requ\\u00eate POST pour r\\u00e9cup\\u00e9rer le token\\nurl = f\\\"{dnac_url}\\\/dna\\\/system\\\/api\\\/v1\\\/auth\\\/token\\\"\\n\\nresponse = requests.post(\\n    url,\\n    auth=HTTPBasicAuth(username, password),\\n    headers={\\\"Content-Type\\\": \\\"application\\\/json\\\"},\\n    verify=False \\n)\\n\\n# Affichage du r\\u00e9sultat\\nif response.status_code == 200:\\n    token = response.json()[\\\"Token\\\"]\\n    print(\\\"Token r\\u00e9cup\\u00e9r\\u00e9 avec succ\\u00e8s !\\\")\\n    print(\\\"Token :\\\", token)\\nelse:\\n    print(\\\"Erreur:\\\", response.status_code)\\n    print(response.text)\",\"mode\":\"python\",\"theme\":\"hopscotch\",\"showLines\":true,\"startLine\":1,\"wrapLines\":true}<\/script>\n  <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C&rsquo;est un peu brut comme ceci, mais voici ce que cela donne ligne par ligne.<\/p>\n\n\n<div class=\"wp-block-prettycode-code  \">\n  <header class=\"prettycode-header\">\n    <div class=\"prettycode-lang is-lang-python\">\n      Python    <\/div>\n    <div class=\"prettycode-file\">\n          <\/div>\n  <\/header>\n  <div class=\"prettycode-editor\">\n    <script type=\"application\/json\" class=\"prettycode-data\">{\"source\":\"import requests\\nfrom requests.auth import HTTPBasicAuth\",\"mode\":\"python\",\"theme\":\"hopscotch\",\"showLines\":true,\"startLine\":1,\"wrapLines\":true}<\/script>\n  <\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>import requests<\/strong> : importe la biblioth\u00e8que requests, qui permet de faire facilement des appels HTTP (GET, POST, etc.).<\/li>\n\n\n\n<li><strong>from requests.auth import HTTPBasicAuth<\/strong> : permet d\u2019utiliser l\u2019authentification de type HTTP Basic (nom d\u2019utilisateur + mot de passe).<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-prettycode-code  \">\n  <header class=\"prettycode-header\">\n    <div class=\"prettycode-lang is-lang-python\">\n      Python    <\/div>\n    <div class=\"prettycode-file\">\n          <\/div>\n  <\/header>\n  <div class=\"prettycode-editor\">\n    <script type=\"application\/json\" class=\"prettycode-data\">{\"source\":\"dnac_url = \\\"https:\\\/\\\/10.10.20.90\\\"\\nusername = \\\"admin\\\"\\npassword = \\\"Cisco123\\\"\",\"mode\":\"python\",\"theme\":\"hopscotch\",\"showLines\":true,\"startLine\":1,\"wrapLines\":true}<\/script>\n  <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On d\u00e9finit les informations de connexion au Catalyst Center (IP, Username, Password) que l&rsquo;on met dans des variables. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>dnac_url<\/strong> : l\u2019URL de base de ton serveur DNAC (remplace par l\u2019adresse IP ou le nom DNS).<\/li>\n\n\n\n<li><strong>username \/ password<\/strong> : identifiants pour l\u2019API DNAC.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-prettycode-code  \">\n  <header class=\"prettycode-header\">\n    <div class=\"prettycode-lang is-lang-python\">\n      Python    <\/div>\n    <div class=\"prettycode-file\">\n          <\/div>\n  <\/header>\n  <div class=\"prettycode-editor\">\n    <script type=\"application\/json\" class=\"prettycode-data\">{\"source\":\"url = f\\\"{dnac_url}\\\/dna\\\/system\\\/api\\\/v1\\\/auth\\\/token\\\"\",\"mode\":\"python\",\"theme\":\"hopscotch\",\"showLines\":true,\"startLine\":1,\"wrapLines\":true}<\/script>\n  <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On r\u00e9\u00e9crit l&rsquo;url en associant l&rsquo;IP du Catalyst Center et le reste de l&rsquo;URL que l&rsquo;on place dans une variable appell\u00e9e url.<\/p>\n\n\n<div class=\"wp-block-prettycode-code  \">\n  <header class=\"prettycode-header\">\n    <div class=\"prettycode-lang is-lang-python\">\n      Python    <\/div>\n    <div class=\"prettycode-file\">\n          <\/div>\n  <\/header>\n  <div class=\"prettycode-editor\">\n    <script type=\"application\/json\" class=\"prettycode-data\">{\"source\":\"response = requests.post(\\nurl,\\nauth=HTTPBasicAuth(username, password),\\nheaders={\\\"Content-Type\\\": \\\"application\\\/json\\\"},\\nverify=False # d\\u00e9sactive la v\\u00e9rification SSL\\n)\",\"mode\":\"python\",\"theme\":\"hopscotch\",\"showLines\":true,\"startLine\":1,\"wrapLines\":true}<\/script>\n  <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tu envoies une requ\u00eate POST \u00e0 DNAC :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Je donne <strong>l&rsquo;url <\/strong>comme cible \u00e0 ma requ\u00eate POST<\/li>\n\n\n\n<li><strong>auth=HTTPBasicAuth<\/strong>(\u2026) : Je m&rsquo;identifie avec mon <strong>Username\/Password<\/strong><\/li>\n\n\n\n<li><strong>headers=<\/strong>{\u2026} : Ce header indique au serveur qu\u2019on attend une r\u00e9ponse au format JSON. Dans ce cas pr\u00e9cis, m\u00eame si on n\u2019envoie pas de contenu, c\u2019est souvent exig\u00e9 par l\u2019API DNAC.<\/li>\n\n\n\n<li><strong>verify=False<\/strong> : Je d\u00e9sactive la v\u00e9rification du certificat SSL (Utile en lab principalement)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pour rappel, les fonctions : <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>requests.get()<\/strong> : Pour r\u00e9cup\u00e9rer des donn\u00e9es (lecture)<\/li>\n\n\n\n<li><strong>requests.post()<\/strong> :  Pour envoyer des donn\u00e9es (cr\u00e9ation)<\/li>\n\n\n\n<li><strong>requests.put() <\/strong>: Pour modifier des donn\u00e9es<\/li>\n\n\n\n<li><strong>requests.delete() <\/strong>: Pour supprimer<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-prettycode-code  \">\n  <header class=\"prettycode-header\">\n    <div class=\"prettycode-lang is-lang-python\">\n      Python    <\/div>\n    <div class=\"prettycode-file\">\n          <\/div>\n  <\/header>\n  <div class=\"prettycode-editor\">\n    <script type=\"application\/json\" class=\"prettycode-data\">{\"source\":\"if response.status_code == 200:\\ntoken = response.json()[\\\"Token\\\"]\\n\\nprint(\\\"Token :\\\", token)\\nSi la r\\u00e9ponse HTTP est un succ\\u00e8s (code 200) :\",\"mode\":\"python\",\"theme\":\"hopscotch\",\"showLines\":true,\"startLine\":1,\"wrapLines\":true}<\/script>\n  <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Si le code HTTP est 200, cela signifie que l\u2019authentification a r\u00e9ussi.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Si c&rsquo;est bon, ma variable <strong>token <\/strong>sera remplie de la partie token de la r\u00e9ponse JSON. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ensuite, j&rsquo;affiche mon Token sous forme de texte. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pour rappel, les codes HTTP : <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>200<\/code> = OK (tout s&rsquo;est bien pass\u00e9)<\/li>\n\n\n\n<li><code>404<\/code> = Not Found (page ou ressource absente)<\/li>\n\n\n\n<li><code>401<\/code> = Unauthorized (non authentifi\u00e9)<\/li>\n\n\n\n<li><code>500<\/code> = Erreur interne du serveur<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-prettycode-code  \">\n  <header class=\"prettycode-header\">\n    <div class=\"prettycode-lang is-lang-php\">\n      PHP    <\/div>\n    <div class=\"prettycode-file\">\n          <\/div>\n  <\/header>\n  <div class=\"prettycode-editor\">\n    <script type=\"application\/json\" class=\"prettycode-data\">{\"source\":\"else:\\nprint(\\\"Erreur :\\\", response.status_code)\\nprint(response.text)\",\"mode\":\"php\",\"theme\":\"hopscotch\",\"showLines\":true,\"startLine\":1,\"wrapLines\":true}<\/script>\n  <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Si le code n&rsquo;est pas de 200 alors j&rsquo;affiche le code HTTP puis le texte de la r\u00e9ponse JSON.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Voici le r\u00e9sultat (le Token est en bas) : <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"626\" data-src=\"https:\/\/network360.fr\/wp-content\/uploads\/2025\/05\/image-1024x626.png\" alt=\"\" class=\"wp-image-673 lazyload\" data-srcset=\"https:\/\/network360.fr\/wp-content\/uploads\/2025\/05\/image-1024x626.png 1024w, https:\/\/network360.fr\/wp-content\/uploads\/2025\/05\/image-300x183.png 300w, https:\/\/network360.fr\/wp-content\/uploads\/2025\/05\/image-768x469.png 768w, https:\/\/network360.fr\/wp-content\/uploads\/2025\/05\/image.png 1242w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/626;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udd11 Ce token est essentiel<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Il sera utilis\u00e9 dans toutes les autres requ\u00eates sous la forme d\u2019un en-t\u00eate : <strong>X-Auth-Token<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>R\u00e9cup\u00e9ration d&rsquo;un token Catalyst Center via Python<\/p>\n","protected":false},"author":1,"featured_media":678,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[22],"tags":[64,39,68,25],"class_list":["post-649","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automatisation","tag-automation","tag-ccna","tag-devnet","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Obtenir un token d&#039;authentification depuis Catalyst Center avec Python - Network360<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Obtenir un token d&#039;authentification depuis Catalyst Center avec Python - Network360\" \/>\n<meta property=\"og:description\" content=\"R\u00e9cup\u00e9ration d&#039;un token Catalyst Center via Python\" \/>\n<meta property=\"og:url\" content=\"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Network360\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-21T16:58:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-20T13:30:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1709\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/\"},\"author\":{\"name\":\"Admin\",\"@id\":\"https:\\\/\\\/network360.fr\\\/#\\\/schema\\\/person\\\/0f765d2aa5031b9c6e0ff879e9622f00\"},\"headline\":\"Obtenir un token d&rsquo;authentification depuis Catalyst Center avec Python\",\"datePublished\":\"2025-05-21T16:58:37+00:00\",\"dateModified\":\"2025-06-20T13:30:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/\"},\"wordCount\":443,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/network360.fr\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/pexels-photo-1181359-1181359-scaled.jpg\",\"keywords\":[\"Automation\",\"CCNA\",\"Devnet\",\"Python\"],\"articleSection\":[\"Automatisation\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/\",\"url\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/\",\"name\":\"Obtenir un token d'authentification depuis Catalyst Center avec Python - Network360\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/network360.fr\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/pexels-photo-1181359-1181359-scaled.jpg\",\"datePublished\":\"2025-05-21T16:58:37+00:00\",\"dateModified\":\"2025-06-20T13:30:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/network360.fr\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/pexels-photo-1181359-1181359-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/network360.fr\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/pexels-photo-1181359-1181359-scaled.jpg\",\"width\":2560,\"height\":1709,\"caption\":\"A developer typing code on a laptop with a Python book beside in an office.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/2025\\\/05\\\/21\\\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/network360.fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Obtenir un token d&rsquo;authentification depuis Catalyst Center avec Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/network360.fr\\\/#website\",\"url\":\"https:\\\/\\\/network360.fr\\\/\",\"name\":\"Network360\",\"description\":\"Network360.FR | Boostez votre carri\u00e8re r\u00e9seau : CCNA, Cisco, Automation |\",\"publisher\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/network360.fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/network360.fr\\\/#organization\",\"name\":\"Network360\",\"url\":\"https:\\\/\\\/network360.fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/network360.fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/network360.fr\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/cropped-LOGO3-3_preview_rev_1-1.png?fit=501%2C410&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/network360.fr\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/cropped-LOGO3-3_preview_rev_1-1.png?fit=501%2C410&ssl=1\",\"width\":501,\"height\":410,\"caption\":\"Network360\"},\"image\":{\"@id\":\"https:\\\/\\\/network360.fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/network360.fr\\\/#\\\/schema\\\/person\\\/0f765d2aa5031b9c6e0ff879e9622f00\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/268fa79373fa3d1db9782a1cda40eca20b34e670aede3da90a8fb05b69521bbd?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/268fa79373fa3d1db9782a1cda40eca20b34e670aede3da90a8fb05b69521bbd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/268fa79373fa3d1db9782a1cda40eca20b34e670aede3da90a8fb05b69521bbd?s=96&d=mm&r=g\",\"caption\":\"Admin\"},\"sameAs\":[\"https:\\\/\\\/network360.fr\"],\"url\":\"https:\\\/\\\/network360.fr\\\/index.php\\\/author\\\/netadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Obtenir un token d'authentification depuis Catalyst Center avec Python - Network360","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/","og_locale":"fr_FR","og_type":"article","og_title":"Obtenir un token d'authentification depuis Catalyst Center avec Python - Network360","og_description":"R\u00e9cup\u00e9ration d'un token Catalyst Center via Python","og_url":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/","og_site_name":"Network360","article_published_time":"2025-05-21T16:58:37+00:00","article_modified_time":"2025-06-20T13:30:29+00:00","og_image":[{"width":2560,"height":1709,"url":"https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg","type":"image\/jpeg"}],"author":"Admin","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Admin","Dur\u00e9e de lecture estim\u00e9e":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#article","isPartOf":{"@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/"},"author":{"name":"Admin","@id":"https:\/\/network360.fr\/#\/schema\/person\/0f765d2aa5031b9c6e0ff879e9622f00"},"headline":"Obtenir un token d&rsquo;authentification depuis Catalyst Center avec Python","datePublished":"2025-05-21T16:58:37+00:00","dateModified":"2025-06-20T13:30:29+00:00","mainEntityOfPage":{"@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/"},"wordCount":443,"commentCount":0,"publisher":{"@id":"https:\/\/network360.fr\/#organization"},"image":{"@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#primaryimage"},"thumbnailUrl":"https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg","keywords":["Automation","CCNA","Devnet","Python"],"articleSection":["Automatisation"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/","url":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/","name":"Obtenir un token d'authentification depuis Catalyst Center avec Python - Network360","isPartOf":{"@id":"https:\/\/network360.fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#primaryimage"},"image":{"@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#primaryimage"},"thumbnailUrl":"https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg","datePublished":"2025-05-21T16:58:37+00:00","dateModified":"2025-06-20T13:30:29+00:00","breadcrumb":{"@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#primaryimage","url":"https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg","contentUrl":"https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg","width":2560,"height":1709,"caption":"A developer typing code on a laptop with a Python book beside in an office."},{"@type":"BreadcrumbList","@id":"https:\/\/network360.fr\/index.php\/2025\/05\/21\/obtenir-un-token-dauthentification-depuis-catalyst-center-avec-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/network360.fr\/"},{"@type":"ListItem","position":2,"name":"Obtenir un token d&rsquo;authentification depuis Catalyst Center avec Python"}]},{"@type":"WebSite","@id":"https:\/\/network360.fr\/#website","url":"https:\/\/network360.fr\/","name":"Network360","description":"Network360.FR | Boostez votre carri\u00e8re r\u00e9seau : CCNA, Cisco, Automation |","publisher":{"@id":"https:\/\/network360.fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/network360.fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/network360.fr\/#organization","name":"Network360","url":"https:\/\/network360.fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/network360.fr\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/network360.fr\/wp-content\/uploads\/2024\/12\/cropped-LOGO3-3_preview_rev_1-1.png?fit=501%2C410&ssl=1","contentUrl":"https:\/\/i0.wp.com\/network360.fr\/wp-content\/uploads\/2024\/12\/cropped-LOGO3-3_preview_rev_1-1.png?fit=501%2C410&ssl=1","width":501,"height":410,"caption":"Network360"},"image":{"@id":"https:\/\/network360.fr\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/network360.fr\/#\/schema\/person\/0f765d2aa5031b9c6e0ff879e9622f00","name":"Admin","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/secure.gravatar.com\/avatar\/268fa79373fa3d1db9782a1cda40eca20b34e670aede3da90a8fb05b69521bbd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/268fa79373fa3d1db9782a1cda40eca20b34e670aede3da90a8fb05b69521bbd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/268fa79373fa3d1db9782a1cda40eca20b34e670aede3da90a8fb05b69521bbd?s=96&d=mm&r=g","caption":"Admin"},"sameAs":["https:\/\/network360.fr"],"url":"https:\/\/network360.fr\/index.php\/author\/netadmin\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg",2560,1709,false],"thumbnail":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-150x150.jpg",150,150,true],"medium":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-300x200.jpg",300,200,true],"medium_large":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-768x513.jpg",768,513,true],"large":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-1024x684.jpg",1024,684,true],"hd_qu_size2":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-scaled.jpg",400,267,false],"1536x1536":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-1536x1025.jpg",1536,1025,true],"2048x2048":["https:\/\/network360.fr\/wp-content\/uploads\/2025\/06\/pexels-photo-1181359-1181359-2048x1367.jpg",2048,1367,true]},"uagb_author_info":{"display_name":"Admin","author_link":"https:\/\/network360.fr\/index.php\/author\/netadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"R\u00e9cup\u00e9ration d'un token Catalyst Center via Python","_links":{"self":[{"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/posts\/649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/comments?post=649"}],"version-history":[{"count":2,"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/posts\/649\/revisions"}],"predecessor-version":[{"id":679,"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/posts\/649\/revisions\/679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/media\/678"}],"wp:attachment":[{"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/media?parent=649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/categories?post=649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/network360.fr\/index.php\/wp-json\/wp\/v2\/tags?post=649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}