{"id":14371,"date":"2022-08-09T16:39:39","date_gmt":"2022-08-09T19:39:39","guid":{"rendered":"https:\/\/jmvstream.com\/autenticacion\/"},"modified":"2022-12-16T09:44:43","modified_gmt":"2022-12-16T12:44:43","slug":"autenticacion","status":"publish","type":"post","link":"https:\/\/jmvstream.com\/es\/developer-es\/autenticacion\/","title":{"rendered":"Autenticaci\u00f3n"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]Para utilizar la API de Jmvstream es necesario obtener el <strong>token JWT<\/strong> para la autenticaci\u00f3n. A continuaci\u00f3n se muestra la ruta y la solicitud necesaria para obtener el token:[\/vc_column_text][\/vc_column][\/vc_row][vc_row apply_row_margin=&#8221;individually&#8221; row_margin_bottom=&#8221;10px&#8221;][vc_column][vc_column_text]<\/p>\n<h2>Route<\/h2>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][inova_raw_html]<\/p>\n<table>\n<thead>\n<tr>\n<th>M\u00e9todo<\/th>\n<th>Ruta<\/th>\n<th>Descripci\u00f3n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>POST<\/td>\n<td><code>\/v1\/authenticate <\/code><\/td>\n<td>Devuelve el token JWT.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/inova_raw_html][\/vc_column][\/vc_row][vc_row apply_row_margin=&#8221;individually&#8221; row_margin_bottom=&#8221;10px&#8221;][vc_column][vc_column_text]<\/p>\n<h2>Body Params<\/h2>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row apply_row_margin=&#8221;top_bottom&#8221; row_margin_top_bottom=&#8221;10px&#8221;][vc_column][inova_raw_html]<\/p>\n<table>\n<thead>\n<tr>\n<th>Param<\/th>\n<th>Escribe<\/th>\n<th>Descripci\u00f3n<\/th>\n<th>Obligatorio<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>email<\/td>\n<td><code>String<\/code><\/td>\n<td>E-mail<\/td>\n<td>S\u00ed<\/td>\n<\/tr>\n<tr>\n<td>password<\/td>\n<td><code>String<\/code><\/td>\n<td>Password<\/td>\n<td>S\u00ed<\/td>\n<\/tr>\n<tr>\n<td>resource<\/td>\n<td><code>String<\/code><\/td>\n<td>Uuid* de la aplicaci\u00f3n<\/td>\n<td>S\u00ed<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/inova_raw_html][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]*<strong>UUID (resource)<\/strong> encuentra en el HUB, cualquier pregunta s\u00f3lo tiene que ponerse en contacto con nuestro equipo de apoyo.[\/vc_column_text][\/vc_column][\/vc_row][vc_row apply_row_margin=&#8221;individually&#8221; row_margin_bottom=&#8221;15px&#8221;][vc_column][vc_column_text]<\/p>\n<h2>Response<\/h2>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h4>&#8211; Respuesta de retorno del token (Estado: 200)<\/h4>\n<p>[\/vc_column_text][inova_raw_html]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\n  \"token\": \"&lt;JWT_TOKEN&gt;\"\n}<\/pre>\n<p>[\/inova_raw_html][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h4>&#8211; Respuesta de error al no enviar el campo requerido o el campo en formato incorrecto (Estado: 400)<\/h4>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\n    \"email\" is required\n}<\/pre>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h4>&#8211; Respuesta de error cuando el usuario no pudo ser autenticado (Estado: 401)<\/h4>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\n  \"message\": \"not allowed\"\n}<\/pre>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h4>&#8211; Respuesta de error debido a alg\u00fan error interno (Estado: 500)<\/h4>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\n  \"error\": \"Internal Server Error\"\n}<\/pre>\n<p>[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text]Para utilizar la API de Jmvstream es necesario obtener el token JWT para la autenticaci\u00f3n.<\/p>\n","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"documentation.php","format":"standard","meta":{"footnotes":""},"categories":[425,424],"tags":[],"class_list":["post-14371","post","type-post","status-publish","format-standard","hentry","category-comenzando","category-developer-es"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/posts\/14371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/comments?post=14371"}],"version-history":[{"count":0,"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/posts\/14371\/revisions"}],"wp:attachment":[{"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/media?parent=14371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/categories?post=14371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jmvstream.com\/es\/wp-json\/wp\/v2\/tags?post=14371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}