{"id":14311,"date":"2022-08-09T13:51:07","date_gmt":"2022-08-09T16:51:07","guid":{"rendered":"https:\/\/jmvstream.com\/authentication\/"},"modified":"2022-12-16T09:43:22","modified_gmt":"2022-12-16T12:43:22","slug":"authentication","status":"publish","type":"post","link":"https:\/\/jmvstream.com\/en\/development\/authentication\/","title":{"rendered":"Authentication"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]To use the Jmvstream API, it is necessary to obtain the <strong>JWT Token<\/strong>\u00a0for authentication. Below is the route and the request needed to obtain the 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>Method<\/th>\n<th>Route<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>POST<\/td>\n<td><code>\/v1\/authenticate <\/code><\/td>\n<td>Returns JWT token.<\/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>Type<\/th>\n<th>Description<\/th>\n<th>Required<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>email<\/td>\n<td><code>String<\/code><\/td>\n<td>Email<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>password<\/td>\n<td><code>String<\/code><\/td>\n<td>Password<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>resource<\/td>\n<td><code>String<\/code><\/td>\n<td>Uuid* of application<\/td>\n<td>Yes<\/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> is found on the HUB, any questions just contact our support team.[\/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; Token return response (Status: 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; Error response when not sending required field or field in incorrect format (Status: 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; Error response when unable to authenticate the user (Status: 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; Error response for some internal error (Status: 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]To use the Jmvstream API, it is necessary to obtain the JWT Token\u00a0for authentication. Below<\/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":[410,411],"tags":[],"class_list":["post-14311","post","type-post","status-publish","format-standard","hentry","category-development","category-getting-started"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/posts\/14311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/comments?post=14311"}],"version-history":[{"count":0,"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/posts\/14311\/revisions"}],"wp:attachment":[{"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/media?parent=14311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/categories?post=14311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jmvstream.com\/en\/wp-json\/wp\/v2\/tags?post=14311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}