{"id":2183,"date":"2023-04-06T15:04:47","date_gmt":"2023-04-06T15:04:47","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=2183"},"modified":"2023-04-06T15:04:47","modified_gmt":"2023-04-06T15:04:47","slug":"create-json-web-token","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/create-json-web-token\/","title":{"rendered":"Create JSON Web token"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Generates JSON Web Tokens (JWT) from the provided payload and the private key with the selected encryption algorithm.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2023\/04\/img-207-0be7d332391b4eb09e9d0941ad799d49.png\" width=\"280\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>inputs<\/strong><\/p>\n\n\n\n<p><span style=\"color:#6888c9;\">payload<\/span> &#8211; link the claims in JSON format, e.g.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n{\u200b\u200b\u200b\u200b\u200b\n\n  \"sub\": \"1234567890\",\n\n  \"name\": \"John Doe\",\n\n  \"admin\": true\n\n}\u200b\u200b\u200b\u200b\u200b<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Required: yes<\/li>\n<\/ul>\n\n\n\n<p><span style=\"color:#9ed267;\">private key<\/span> &#8211; link with the private key value for RSA algorithms or secret for HMAC ones.<\/p>\n\n\n\n<p><em>Note: private key must begin with &#8212;&#8211;BEGIN PRIVATE KEY&#8212;&#8211; and ends with &#8212;&#8211;END PRIVATE KEY&#8212;&#8211;<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Required: yes<\/li>\n<\/ul>\n\n\n\n<p><span style=\"color:#9ed267;\">algo<\/span> &#8211; link or directly specify encryption algorithm. Currently, supported algorithms are HS256, HS384, HS512, RS256, RS384, and RS512.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Required: yes<\/li>\n<\/ul>\n\n\n\n<p><strong>outputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#9ed267;\">jwt<\/span> &#8211; generated JWT<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2023\/04\/img-207-9a0a4cc22f4e4c38bab104cd3d560789.png\" alt=\"\" class=\"wp-image-837\"\/><\/figure>\n<div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_2183' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-2183\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-5b909ab7c675e' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-5b909ab7c675e'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='2183' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-5b909ab7c675e\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"2183\" \n                               id=\"yasr-stats-dashicon-5b909ab7c675e\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-5b909ab7c675e\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-5b909ab7c675e\">0<\/span>  Average: <span id=\"yasr-vv-average-container-5b909ab7c675e\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-5b909ab7c675e' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-5b909ab7c675e' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Generates JSON Web Tokens (JWT) from the provided payload and the private key with the selected encryption algorithm. inputs payload &#8211; link the claims in JSON format, e.g. private key &#8211; link with the private key value for RSA algorithms or secret for HMAC ones. Note: private key must begin with &#8212;&#8211;BEGIN PRIVATE KEY&#8212;&#8211; and &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/create-json-web-token\/\"> <span class=\"screen-reader-text\">Create JSON Web token<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-2183","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/2183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=2183"}],"version-history":[{"count":5,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/2183\/revisions"}],"predecessor-version":[{"id":2191,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/2183\/revisions\/2191"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=2183"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=2183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}