<!doctypehtml><meta charset=utf-8><title>
   Authentication - Insomnia
  </title><meta content=width=device-width,maximum-scale=1 name=viewport><meta content=yes name=apple-mobile-web-app-capable><meta content=telephone=no name=format-detection><meta content="There are many different authentication standards being used for HTTP today, including Basic, Digest, NTLM, API Keys, OAuth, HAWK, just to name a few. The probl"name=description><meta content=Insomnia name=author><link href=https://support.insomnia.rest/article/38-authentication rel=canonical><meta content=summary name=twitter:card><meta content=Authentication name=twitter:title><meta content="There are many different authentication standards being used for HTTP today, including Basic, Digest, NTLM, API Keys, OAuth, HAWK, just to name a few. The probl"name=twitter:description><link href=//d3eto7onm69fcz.cloudfront.net/assets/stylesheets/launch-1599136850798.css rel=stylesheet><style>body { background: #f7f9fa; }
        .navbar .navbar-inner { background: #000000; }
        .navbar .nav li a, 
        .navbar .icon-private-w  { color: #f2f2f2; }
        .navbar .brand, 
        .navbar .nav li a:hover, 
        .navbar .nav li a:focus, 
        .navbar .nav .active a, 
        .navbar .nav .active a:hover, 
        .navbar .nav .active a:focus  { color: #ffffff; }
        .navbar a:hover .icon-private-w, 
        .navbar a:focus .icon-private-w, 
        .navbar .active a .icon-private-w, 
        .navbar .active a:hover .icon-private-w, 
        .navbar .active a:focus .icon-private-w { color: #ffffff; }
        #serp-dd .result a:hover,
        #serp-dd .result > li.active,
        #fullArticle strong a,
        #fullArticle a strong,
        .collection a,
        .contentWrapper a,
        .most-pop-articles .popArticles a,
        .most-pop-articles .popArticles a:hover span,
        .category-list .category .article-count,
        .category-list .category:hover .article-count { color: #4000bf; }
        #fullArticle, 
        #fullArticle p, 
        #fullArticle ul, 
        #fullArticle ol, 
        #fullArticle li, 
        #fullArticle div, 
        #fullArticle blockquote, 
        #fullArticle dd, 
        #fullArticle table { color:#585858; }</style><link href=//s3.amazonaws.com/helpscout.net/docs/assets/59e383122c7d3a40f0ed78e2/attachments/5f07589f04286306f8067448/insomnia-helpscout.css rel=stylesheet><link href=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/5ea7218d04286364bc9912ce/logo-32x--insomnia-core-(2).png rel=apple-touch-icon-precomposed><link rel="shortcut icon"href=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/5ea7218d2c7d3a7e9aebb503/logo-32x--insomnia-core.png type=image/png><script async defer src=https://www.google.com/recaptcha/api.js></script><script type=application/ld+json>
   {"@context":"https://schema.org","@type":"WebSite","url":"https://support.insomnia.rest","potentialAction":{"@type":"SearchAction","target":"https://support.insomnia.rest/search?query={query}","query-input":"required name=query"}}
  </script><script type=application/ld+json>
   {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Insomnia","item":"https://support.insomnia.rest"},{"@type":"ListItem","position":2,"name":"Core","item":"https://support.insomnia.rest/collection/6-core"},{"@type":"ListItem","position":3,"name":"Authentication","item":"https://support.insomnia.rest/article/38-authentication"}]}
  </script><script>!function(e,t,n){function a(){var e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],"complete"===t.readyState)return a();e.attachEvent?e.attachEvent("onload",a):e.addEventListener("load",a,!1)}(window,document,window.Beacon||function(){});</script><script>window.Beacon('init', 'fce2431f-e83d-4205-b0c6-80fd9c2dc95e')</script><script>window.addEventListener('load', function () {
        var els = document.querySelectorAll('pre.code');
        for (var i = 0; i < els.length; i++) {
            hljs.highlightBlock(els[i]);
        }
    });</script><script src=//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js></script><script crossorigin integrity=sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0= src=https://code.jquery.com/jquery-3.5.1.min.js></script><script>(function($){"use strict";var toc=function(options){return this.each(function(){var root=$(this),data=root.data(),thisOptions,stack=[root],listTag=this.tagName,currentLevel=0,headingSelectors;thisOptions=$.extend({content:"body",headings:"h1,h2,h3"},{content:data.toc||undefined,headings:data.tocHeadings||undefined},options);headingSelectors=thisOptions.headings.split(",");$(thisOptions.content).find(thisOptions.headings).attr("id",function(index,attr){var generateUniqueId=function(text){if(text.length===0){text="?"}var baseId=text.replace(/\s+/g,"_"),suffix="",count=1;while(document.getElementById(baseId+suffix)!==null){suffix="_"+count++}return baseId+suffix};return attr||generateUniqueId($(this).text())}).each(function(){var elem=$(this),level=$.map(headingSelectors,function(selector,index){return elem.is(selector)?index:undefined})[0];if(level>currentLevel){var parentItem=stack[0].children("li:last")[0];if(parentItem){stack.unshift($("<"+listTag+"/>").appendTo(parentItem))}}else{stack.splice(0,Math.min(currentLevel-level,Math.max(stack.length-1,0)))}$("<li></li>").appendTo(stack[0]).append($("<a></a>").text(elem.text()).attr("href","#"+elem.attr("id")));currentLevel=level})})},old=$.fn.toc;$.fn.toc=toc;$.fn.toc.noConflict=function(){$.fn.toc=old;return this};$(function(){toc.call($("[data-toc]"))})})(jQuery);</script><script>(function($) {
$(document).ready(function () {
  $(".scout-toc").toc({content: "#fullArticle", headings: "h1:not(:first),h2,h3"});

// Image to Lightbox Overlay 
$('body').append('<div id="overlay"></div>');
$('#fullArticle img').on('click', function() {
  $('#overlay')
    .css({backgroundImage: `url(${this.src})`})
    .addClass('open')
    .one('click', function() { $(this).removeClass('open'); });
});
});
})(jQuery);</script><script>(window.NREUM||(NREUM={})).loader_config={xpid:"UgMCUFZADAoGXFhUAA==",licenseKey:"248c08e607",applicationID:"4968967"};window.NREUM||(NREUM={}),__nr_require=function(t,e,n){function r(n){if(!e[n]){var i=e[n]={exports:{}};t[n][0].call(i.exports,function(e){var i=t[n][1][e];return r(i||e)},i,i.exports)}return e[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var i=0;i<n.length;i++)r(n[i]);return r}({1:[function(t,e,n){function r(t){try{c.console&&console.log(t)}catch(e){}}var i,o=t("ee"),a=t(23),c={};try{i=localStorage.getItem("__nr_flags").split(","),console&&"function"==typeof console.log&&(c.console=!0,i.indexOf("dev")!==-1&&(c.dev=!0),i.indexOf("nr_dev")!==-1&&(c.nrDev=!0))}catch(s){}c.nrDev&&o.on("internal-error",function(t){r(t.stack)}),c.dev&&o.on("fn-err",function(t,e,n){r(n.stack)}),c.dev&&(r("NR AGENT IN DEVELOPMENT MODE"),r("flags: "+a(c,function(t,e){return t}).join(", ")))},{}],2:[function(t,e,n){function r(t,e,n,r,c){try{p?p-=1:i(c||new UncaughtException(t,e,n),!0)}catch(f){try{o("ierr",[f,s.now(),!0])}catch(d){}}return"function"==typeof u&&u.apply(this,a(arguments))}function UncaughtException(t,e,n){this.message=t||"Uncaught error with no additional information",this.sourceURL=e,this.line=n}function i(t,e){var n=e?null:s.now();o("err",[t,n])}var o=t("handle"),a=t(24),c=t("ee"),s=t("loader"),f=t("gos"),u=window.onerror,d=!1,l="nr@seenError",p=0;s.features.err=!0,t(1),window.onerror=r;try{throw new Error}catch(h){"stack"in h&&(t(9),t(8),"addEventListener"in window&&t(5),s.xhrWrappable&&t(10),d=!0)}c.on("fn-start",function(t,e,n){d&&(p+=1)}),c.on("fn-err",function(t,e,n){d&&!n[l]&&(f(n,l,function(){return!0}),this.thrown=!0,i(n))}),c.on("fn-end",function(){d&&!this.thrown&&p>0&&(p-=1)}),c.on("internal-error",function(t){o("ierr",[t,s.now(),!0])})},{}],3:[function(t,e,n){t("loader").features.ins=!0},{}],4:[function(t,e,n){function r(t){}if(window.performance&&window.performance.timing&&window.performance.getEntriesByType){var i=t("ee"),o=t("handle"),a=t(9),c=t(8),s="learResourceTimings",f="addEventListener",u="resourcetimingbufferfull",d="bstResource",l="resource",p="-start",h="-end",m="fn"+p,w="fn"+h,v="bstTimer",g="pushState",y=t("loader");y.features.stn=!0,t(7),"addEventListener"in window&&t(5);var x=NREUM.o.EV;i.on(m,function(t,e){var n=t[0];n instanceof x&&(this.bstStart=y.now())}),i.on(w,function(t,e){var n=t[0];n instanceof x&&o("bst",[n,e,this.bstStart,y.now()])}),a.on(m,function(t,e,n){this.bstStart=y.now(),this.bstType=n}),a.on(w,function(t,e){o(v,[e,this.bstStart,y.now(),this.bstType])}),c.on(m,function(){this.bstStart=y.now()}),c.on(w,function(t,e){o(v,[e,this.bstStart,y.now(),"requestAnimationFrame"])}),i.on(g+p,function(t){this.time=y.now(),this.startPath=location.pathname+location.hash}),i.on(g+h,function(t){o("bstHist",[location.pathname+location.hash,this.startPath,this.time])}),f in window.performance&&(window.performance["c"+s]?window.performance[f](u,function(t){o(d,[window.performance.getEntriesByType(l)]),window.performance["c"+s]()},!1):window.performance[f]("webkit"+u,function(t){o(d,[window.performance.getEntriesByType(l)]),window.performance["webkitC"+s]()},!1)),document[f]("scroll",r,{passive:!0}),document[f]("keypress",r,!1),document[f]("click",r,!1)}},{}],5:[function(t,e,n){function r(t){for(var e=t;e&&!e.hasOwnProperty(u);)e=Object.getPrototypeOf(e);e&&i(e)}function i(t){c.inPlace(t,[u,d],"-",o)}function o(t,e){return t[1]}var a=t("ee").get("events"),c=t("wrap-function")(a,!0),s=t("gos"),f=XMLHttpRequest,u="addEventListener",d="removeEventListener";e.exports=a,"getPrototypeOf"in Object?(r(document),r(window),r(f.prototype)):f.prototype.hasOwnProperty(u)&&(i(window),i(f.prototype)),a.on(u+"-start",function(t,e){var n=t[1],r=s(n,"nr@wrapped",function(){function t(){if("function"==typeof n.handleEvent)return n.handleEvent.apply(n,arguments)}var e={object:t,"function":n}[typeof n];return e?c(e,"fn-",null,e.name||"anonymous"):n});this.wrapped=t[1]=r}),a.on(d+"-start",function(t){t[1]=this.wrapped||t[1]})},{}],6:[function(t,e,n){function r(t,e,n){var r=t[e];"function"==typeof r&&(t[e]=function(){var t=o(arguments),e={};i.emit(n+"before-start",[t],e);var a;e[m]&&e[m].dt&&(a=e[m].dt);var c=r.apply(this,t);return i.emit(n+"start",[t,a],c),c.then(function(t){return i.emit(n+"end",[null,t],c),t},function(t){throw i.emit(n+"end",[t],c),t})})}var i=t("ee").get("fetch"),o=t(24),a=t(23);e.exports=i;var c=window,s="fetch-",f=s+"body-",u=["arrayBuffer","blob","json","text","formData"],d=c.Request,l=c.Response,p=c.fetch,h="prototype",m="nr@context";d&&l&&p&&(a(u,function(t,e){r(d[h],e,f),r(l[h],e,f)}),r(c,"fetch",s),i.on(s+"end",function(t,e){var n=this;if(e){var r=e.headers.get("content-length");null!==r&&(n.rxSize=r),i.emit(s+"done",[null,e],n)}else i.emit(s+"done",[t],n)}))},{}],7:[function(t,e,n){var r=t("ee").get("history"),i=t("wrap-function")(r);e.exports=r;var o=window.history&&window.history.constructor&&window.history.constructor.prototype,a=window.history;o&&o.pushState&&o.replaceState&&(a=o),i.inPlace(a,["pushState","replaceState"],"-")},{}],8:[function(t,e,n){var r=t("ee").get("raf"),i=t("wrap-function")(r),o="equestAnimationFrame";e.exports=r,i.inPlace(window,["r"+o,"mozR"+o,"webkitR"+o,"msR"+o],"raf-"),r.on("raf-start",function(t){t[0]=i(t[0],"fn-")})},{}],9:[function(t,e,n){function r(t,e,n){t[0]=a(t[0],"fn-",null,n)}function i(t,e,n){this.method=n,this.timerDuration=isNaN(t[1])?0:+t[1],t[0]=a(t[0],"fn-",this,n)}var o=t("ee").get("timer"),a=t("wrap-function")(o),c="setTimeout",s="setInterval",f="clearTimeout",u="-start",d="-";e.exports=o,a.inPlace(window,[c,"setImmediate"],c+d),a.inPlace(window,[s],s+d),a.inPlace(window,[f,"clearImmediate"],f+d),o.on(s+u,r),o.on(c+u,i)},{}],10:[function(t,e,n){function r(t,e){d.inPlace(e,["onreadystatechange"],"fn-",c)}function i(){var t=this,e=u.context(t);t.readyState>3&&!e.resolved&&(e.resolved=!0,u.emit("xhr-resolved",[],t)),d.inPlace(t,g,"fn-",c)}function o(t){y.push(t),h&&(b?b.then(a):w?w(a):(E=-E,R.data=E))}function a(){for(var t=0;t<y.length;t++)r([],y[t]);y.length&&(y=[])}function c(t,e){return e}function s(t,e){for(var n in t)e[n]=t[n];return e}t(5);var f=t("ee"),u=f.get("xhr"),d=t("wrap-function")(u),l=NREUM.o,p=l.XHR,h=l.MO,m=l.PR,w=l.SI,v="readystatechange",g=["onload","onerror","onabort","onloadstart","onloadend","onprogress","ontimeout"],y=[];e.exports=u;var x=window.XMLHttpRequest=function(t){var e=new p(t);try{u.emit("new-xhr",[e],e),e.addEventListener(v,i,!1)}catch(n){try{u.emit("internal-error",[n])}catch(r){}}return e};if(s(p,x),x.prototype=p.prototype,d.inPlace(x.prototype,["open","send"],"-xhr-",c),u.on("send-xhr-start",function(t,e){r(t,e),o(e)}),u.on("open-xhr-start",r),h){var b=m&&m.resolve();if(!w&&!m){var E=1,R=document.createTextNode(E);new h(a).observe(R,{characterData:!0})}}else f.on("fn-end",function(t){t[0]&&t[0].type===v||a()})},{}],11:[function(t,e,n){function r(t){if(!c(t))return null;var e=window.NREUM;if(!e.loader_config)return null;var n=(e.loader_config.accountID||"").toString()||null,r=(e.loader_config.agentID||"").toString()||null,f=(e.loader_config.trustKey||"").toString()||null;if(!n||!r)return null;var h=p.generateSpanId(),m=p.generateTraceId(),w=Date.now(),v={spanId:h,traceId:m,timestamp:w};return(t.sameOrigin||s(t)&&l())&&(v.traceContextParentHeader=i(h,m),v.traceContextStateHeader=o(h,w,n,r,f)),(t.sameOrigin&&!u()||!t.sameOrigin&&s(t)&&d())&&(v.newrelicHeader=a(h,m,w,n,r,f)),v}function i(t,e){return"00-"+e+"-"+t+"-01"}function o(t,e,n,r,i){var o=0,a="",c=1,s="",f="";return i+"@nr="+o+"-"+c+"-"+n+"-"+r+"-"+t+"-"+a+"-"+s+"-"+f+"-"+e}function a(t,e,n,r,i,o){var a="btoa"in window&&"function"==typeof window.btoa;if(!a)return null;var c={v:[0,1],d:{ty:"Browser",ac:r,ap:i,id:t,tr:e,ti:n}};return o&&r!==o&&(c.d.tk=o),btoa(JSON.stringify(c))}function c(t){return f()&&s(t)}function s(t){var e=!1,n={};if("init"in NREUM&&"distributed_tracing"in NREUM.init&&(n=NREUM.init.distributed_tracing),t.sameOrigin)e=!0;else if(n.allowed_origins instanceof Array)for(var r=0;r<n.allowed_origins.length;r++){var i=h(n.allowed_origins[r]);if(t.hostname===i.hostname&&t.protocol===i.protocol&&t.port===i.port){e=!0;break}}return e}function f(){return"init"in NREUM&&"distributed_tracing"in NREUM.init&&!!NREUM.init.distributed_tracing.enabled}function u(){return"init"in NREUM&&"distributed_tracing"in NREUM.init&&!!NREUM.init.distributed_tracing.exclude_newrelic_header}function d(){return"init"in NREUM&&"distributed_tracing"in NREUM.init&&NREUM.init.distributed_tracing.cors_use_newrelic_header!==!1}function l(){return"init"in NREUM&&"distributed_tracing"in NREUM.init&&!!NREUM.init.distributed_tracing.cors_use_tracecontext_headers}var p=t(20),h=t(13);e.exports={generateTracePayload:r,shouldGenerateTrace:c}},{}],12:[function(t,e,n){function r(t){var e=this.params,n=this.metrics;if(!this.ended){this.ended=!0;for(var r=0;r<l;r++)t.removeEventListener(d[r],this.listener,!1);e.aborted||(n.duration=a.now()-this.startTime,this.loadCaptureCalled||4!==t.readyState?null==e.status&&(e.status=0):o(this,t),n.cbTime=this.cbTime,u.emit("xhr-done",[t],t),c("xhr",[e,n,this.startTime]))}}function i(t,e){var n=s(e),r=t.params;r.host=n.hostname+":"+n.port,r.pathname=n.pathname,t.parsedOrigin=s(e),t.sameOrigin=t.parsedOrigin.sameOrigin}function o(t,e){t.params.status=e.status;var n=w(e,t.lastSize);if(n&&(t.metrics.rxSize=n),t.sameOrigin){var r=e.getResponseHeader("X-NewRelic-App-Data");r&&(t.params.cat=r.split(", ").pop())}t.loadCaptureCalled=!0}var a=t("loader");if(a.xhrWrappable){var c=t("handle"),s=t(13),f=t(11).generateTracePayload,u=t("ee"),d=["load","error","abort","timeout"],l=d.length,p=t("id"),h=t(17),m=t(16),w=t(14),v=window.XMLHttpRequest;a.features.xhr=!0,t(10),t(6),u.on("new-xhr",function(t){var e=this;e.totalCbs=0,e.called=0,e.cbTime=0,e.end=r,e.ended=!1,e.xhrGuids={},e.lastSize=null,e.loadCaptureCalled=!1,t.addEventListener("load",function(n){o(e,t)},!1),h&&(h>34||h<10)||window.opera||t.addEventListener("progress",function(t){e.lastSize=t.loaded},!1)}),u.on("open-xhr-start",function(t){this.params={method:t[0]},i(this,t[1]),this.metrics={}}),u.on("open-xhr-end",function(t,e){"loader_config"in NREUM&&"xpid"in NREUM.loader_config&&this.sameOrigin&&e.setRequestHeader("X-NewRelic-ID",NREUM.loader_config.xpid);var n=f(this.parsedOrigin);if(n){var r=!1;n.newrelicHeader&&(e.setRequestHeader("newrelic",n.newrelicHeader),r=!0),n.traceContextParentHeader&&(e.setRequestHeader("traceparent",n.traceContextParentHeader),n.traceContextStateHeader&&e.setRequestHeader("tracestate",n.traceContextStateHeader),r=!0),r&&(this.dt=n)}}),u.on("send-xhr-start",function(t,e){var n=this.metrics,r=t[0],i=this;if(n&&r){var o=m(r);o&&(n.txSize=o)}this.startTime=a.now(),this.listener=function(t){try{"abort"!==t.type||i.loadCaptureCalled||(i.params.aborted=!0),("load"!==t.type||i.called===i.totalCbs&&(i.onloadCalled||"function"!=typeof e.onload))&&i.end(e)}catch(n){try{u.emit("internal-error",[n])}catch(r){}}};for(var c=0;c<l;c++)e.addEventListener(d[c],this.listener,!1)}),u.on("xhr-cb-time",function(t,e,n){this.cbTime+=t,e?this.onloadCalled=!0:this.called+=1,this.called!==this.totalCbs||!this.onloadCalled&&"function"==typeof n.onload||this.end(n)}),u.on("xhr-load-added",function(t,e){var n=""+p(t)+!!e;this.xhrGuids&&!this.xhrGuids[n]&&(this.xhrGuids[n]=!0,this.totalCbs+=1)}),u.on("xhr-load-removed",function(t,e){var n=""+p(t)+!!e;this.xhrGuids&&this.xhrGuids[n]&&(delete this.xhrGuids[n],this.totalCbs-=1)}),u.on("addEventListener-end",function(t,e){e instanceof v&&"load"===t[0]&&u.emit("xhr-load-added",[t[1],t[2]],e)}),u.on("removeEventListener-end",function(t,e){e instanceof v&&"load"===t[0]&&u.emit("xhr-load-removed",[t[1],t[2]],e)}),u.on("fn-start",function(t,e,n){e instanceof v&&("onload"===n&&(this.onload=!0),("load"===(t[0]&&t[0].type)||this.onload)&&(this.xhrCbStart=a.now()))}),u.on("fn-end",function(t,e){this.xhrCbStart&&u.emit("xhr-cb-time",[a.now()-this.xhrCbStart,this.onload,e],e)}),u.on("fetch-before-start",function(t){function e(t,e){var n=!1;return e.newrelicHeader&&(t.set("newrelic",e.newrelicHeader),n=!0),e.traceContextParentHeader&&(t.set("traceparent",e.traceContextParentHeader),e.traceContextStateHeader&&t.set("tracestate",e.traceContextStateHeader),n=!0),n}var n,r=t[1]||{};"string"==typeof t[0]?n=t[0]:t[0]&&t[0].url?n=t[0].url:window.URL&&t[0]&&t[0]instanceof URL&&(n=t[0].href),n&&(this.parsedOrigin=s(n),this.sameOrigin=this.parsedOrigin.sameOrigin);var i=f(this.parsedOrigin);if(i&&(i.newrelicHeader||i.traceContextParentHeader))if("string"==typeof t[0]||window.URL&&t[0]&&t[0]instanceof URL){var o={};for(var a in r)o[a]=r[a];o.headers=new Headers(r.headers||{}),e(o.headers,i)&&(this.dt=i),t.length>1?t[1]=o:t.push(o)}else t[0]&&t[0].headers&&e(t[0].headers,i)&&(this.dt=i)})}},{}],13:[function(t,e,n){var r={};e.exports=function(t){if(t in r)return r[t];var e=document.createElement("a"),n=window.location,i={};e.href=t,i.port=e.port;var o=e.href.split("://");!i.port&&o[1]&&(i.port=o[1].split("/")[0].split("@").pop().split(":")[1]),i.port&&"0"!==i.port||(i.port="https"===o[0]?"443":"80"),i.hostname=e.hostname||n.hostname,i.pathname=e.pathname,i.protocol=o[0],"/"!==i.pathname.charAt(0)&&(i.pathname="/"+i.pathname);var a=!e.protocol||":"===e.protocol||e.protocol===n.protocol,c=e.hostname===document.domain&&e.port===n.port;return i.sameOrigin=a&&(!e.hostname||c),"/"===i.pathname&&(r[t]=i),i}},{}],14:[function(t,e,n){function r(t,e){var n=t.responseType;return"json"===n&&null!==e?e:"arraybuffer"===n||"blob"===n||"json"===n?i(t.response):"text"===n||""===n||void 0===n?i(t.responseText):void 0}var i=t(16);e.exports=r},{}],15:[function(t,e,n){function r(){}function i(t,e,n){return function(){return o(t,[f.now()].concat(c(arguments)),e?null:this,n),e?void 0:this}}var o=t("handle"),a=t(23),c=t(24),s=t("ee").get("tracer"),f=t("loader"),u=NREUM;"undefined"==typeof window.newrelic&&(newrelic=u);var d=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],l="api-",p=l+"ixn-";a(d,function(t,e){u[e]=i(l+e,!0,"api")}),u.addPageAction=i(l+"addPageAction",!0),u.setCurrentRouteName=i(l+"routeName",!0),e.exports=newrelic,u.interaction=function(){return(new r).get()};var h=r.prototype={createTracer:function(t,e){var n={},r=this,i="function"==typeof e;return o(p+"tracer",[f.now(),t,n],r),function(){if(s.emit((i?"":"no-")+"fn-start",[f.now(),r,i],n),i)try{return e.apply(this,arguments)}catch(t){throw s.emit("fn-err",[arguments,this,t],n),t}finally{s.emit("fn-end",[f.now()],n)}}}};a("actionText,setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(t,e){h[e]=i(p+e)}),newrelic.noticeError=function(t,e){"string"==typeof t&&(t=new Error(t)),o("err",[t,f.now(),!1,e])}},{}],16:[function(t,e,n){e.exports=function(t){if("string"==typeof t&&t.length)return t.length;if("object"==typeof t){if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer&&t.byteLength)return t.byteLength;if("undefined"!=typeof Blob&&t instanceof Blob&&t.size)return t.size;if(!("undefined"!=typeof FormData&&t instanceof FormData))try{return JSON.stringify(t).length}catch(e){return}}}},{}],17:[function(t,e,n){var r=0,i=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);i&&(r=+i[1]),e.exports=r},{}],18:[function(t,e,n){function r(){return c.exists&&performance.now?Math.round(performance.now()):(o=Math.max((new Date).getTime(),o))-a}function i(){return o}var o=(new Date).getTime(),a=o,c=t(25);e.exports=r,e.exports.offset=a,e.exports.getLastTimestamp=i},{}],19:[function(t,e,n){function r(t,e){var n=t.getEntries();n.forEach(function(t){"first-paint"===t.name?d("timing",["fp",Math.floor(t.startTime)]):"first-contentful-paint"===t.name&&d("timing",["fcp",Math.floor(t.startTime)])})}function i(t,e){var n=t.getEntries();n.length>0&&d("lcp",[n[n.length-1]])}function o(t){t.getEntries().forEach(function(t){t.hadRecentInput||d("cls",[t])})}function a(t){if(t instanceof h&&!w){var e=Math.round(t.timeStamp),n={type:t.type};e<=l.now()?n.fid=l.now()-e:e>l.offset&&e<=Date.now()?(e-=l.offset,n.fid=l.now()-e):e=l.now(),w=!0,d("timing",["fi",e,n])}}function c(t){d("pageHide",[l.now(),t])}if(!("init"in NREUM&&"page_view_timing"in NREUM.init&&"enabled"in NREUM.init.page_view_timing&&NREUM.init.page_view_timing.enabled===!1)){var s,f,u,d=t("handle"),l=t("loader"),p=t(22),h=NREUM.o.EV;if("PerformanceObserver"in window&&"function"==typeof window.PerformanceObserver){s=new PerformanceObserver(r);try{s.observe({entryTypes:["paint"]})}catch(m){}f=new PerformanceObserver(i);try{f.observe({entryTypes:["largest-contentful-paint"]})}catch(m){}u=new PerformanceObserver(o);try{u.observe({type:"layout-shift",buffered:!0})}catch(m){}}if("addEventListener"in document){var w=!1,v=["click","keydown","mousedown","pointerdown","touchstart"];v.forEach(function(t){document.addEventListener(t,a,!1)})}p(c)}},{}],20:[function(t,e,n){function r(){function t(){return e?15&e[n++]:16*Math.random()|0}var e=null,n=0,r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(e=r.getRandomValues(new Uint8Array(31)));for(var i,o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",a="",c=0;c<o.length;c++)i=o[c],"x"===i?a+=t().toString(16):"y"===i?(i=3&t()|8,a+=i.toString(16)):a+=i;return a}function i(){return a(16)}function o(){return a(32)}function a(t){function e(){return n?15&n[r++]:16*Math.random()|0}var n=null,r=0,i=window.crypto||window.msCrypto;i&&i.getRandomValues&&Uint8Array&&(n=i.getRandomValues(new Uint8Array(31)));for(var o=[],a=0;a<t;a++)o.push(e().toString(16));return o.join("")}e.exports={generateUuid:r,generateSpanId:i,generateTraceId:o}},{}],21:[function(t,e,n){function r(t,e){if(!i)return!1;if(t!==i)return!1;if(!e)return!0;if(!o)return!1;for(var n=o.split("."),r=e.split("."),a=0;a<r.length;a++)if(r[a]!==n[a])return!1;return!0}var i=null,o=null,a=/Version\/(\S+)\s+Safari/;if(navigator.userAgent){var c=navigator.userAgent,s=c.match(a);s&&c.indexOf("Chrome")===-1&&c.indexOf("Chromium")===-1&&(i="Safari",o=s[1])}e.exports={agent:i,version:o,match:r}},{}],22:[function(t,e,n){function r(t){function e(){t(a&&document[a]?document[a]:document[i]?"hidden":"visible")}"addEventListener"in document&&o&&document.addEventListener(o,e,!1)}e.exports=r;var i,o,a;"undefined"!=typeof document.hidden?(i="hidden",o="visibilitychange",a="visibilityState"):"undefined"!=typeof document.msHidden?(i="msHidden",o="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(i="webkitHidden",o="webkitvisibilitychange",a="webkitVisibilityState")},{}],23:[function(t,e,n){function r(t,e){var n=[],r="",o=0;for(r in t)i.call(t,r)&&(n[o]=e(r,t[r]),o+=1);return n}var i=Object.prototype.hasOwnProperty;e.exports=r},{}],24:[function(t,e,n){function r(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,i=n-e||0,o=Array(i<0?0:i);++r<i;)o[r]=t[e+r];return o}e.exports=r},{}],25:[function(t,e,n){e.exports={exists:"undefined"!=typeof window.performance&&window.performance.timing&&"undefined"!=typeof window.performance.timing.navigationStart}},{}],ee:[function(t,e,n){function r(){}function i(t){function e(t){return t&&t instanceof r?t:t?f(t,s,a):a()}function n(n,r,i,o,a){if(a!==!1&&(a=!0),!p.aborted||o){t&&a&&t(n,r,i);for(var c=e(i),s=m(n),f=s.length,u=0;u<f;u++)s[u].apply(c,r);var l=d[y[n]];return l&&l.push([x,n,r,c]),c}}function o(t,e){g[t]=m(t).concat(e)}function h(t,e){var n=g[t];if(n)for(var r=0;r<n.length;r++)n[r]===e&&n.splice(r,1)}function m(t){return g[t]||[]}function w(t){return l[t]=l[t]||i(n)}function v(t,e){u(t,function(t,n){e=e||"feature",y[n]=e,e in d||(d[e]=[])})}var g={},y={},x={on:o,addEventListener:o,removeEventListener:h,emit:n,get:w,listeners:m,context:e,buffer:v,abort:c,aborted:!1};return x}function o(t){return f(t,s,a)}function a(){return new r}function c(){(d.api||d.feature)&&(p.aborted=!0,d=p.backlog={})}var s="nr@context",f=t("gos"),u=t(23),d={},l={},p=e.exports=i();e.exports.getOrSetContext=o,p.backlog=d},{}],gos:[function(t,e,n){function r(t,e,n){if(i.call(t,e))return t[e];var r=n();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!1}),r}catch(o){}return t[e]=r,r}var i=Object.prototype.hasOwnProperty;e.exports=r},{}],handle:[function(t,e,n){function r(t,e,n,r){i.buffer([t],r),i.emit(t,e,n)}var i=t("ee").get("handle");e.exports=r,r.ee=i},{}],id:[function(t,e,n){function r(t){var e=typeof t;return!t||"object"!==e&&"function"!==e?-1:t===window?0:a(t,o,function(){return i++})}var i=1,o="nr@id",a=t("gos");e.exports=r},{}],loader:[function(t,e,n){function r(){if(!b++){var t=x.info=NREUM.info,e=l.getElementsByTagName("script")[0];if(setTimeout(f.abort,3e4),!(t&&t.licenseKey&&t.applicationID&&e))return f.abort();s(g,function(e,n){t[e]||(t[e]=n)});var n=a();c("mark",["onload",n+x.offset],null,"api"),c("timing",["load",n]);var r=l.createElement("script");r.src="https://"+t.agent,e.parentNode.insertBefore(r,e)}}function i(){"complete"===l.readyState&&o()}function o(){c("mark",["domContent",a()+x.offset],null,"api")}var a=t(18),c=t("handle"),s=t(23),f=t("ee"),u=t(21),d=window,l=d.document,p="addEventListener",h="attachEvent",m=d.XMLHttpRequest,w=m&&m.prototype;NREUM.o={ST:setTimeout,SI:d.setImmediate,CT:clearTimeout,XHR:m,REQ:d.Request,EV:d.Event,PR:d.Promise,MO:d.MutationObserver};var v=""+location,g={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1198.min.js"},y=m&&w&&w[p]&&!/CriOS/.test(navigator.userAgent),x=e.exports={offset:a.getLastTimestamp(),now:a,origin:v,features:{},xhrWrappable:y,userAgent:u};t(15),t(19),l[p]?(l[p]("DOMContentLoaded",o,!1),d[p]("load",r,!1)):(l[h]("onreadystatechange",i),d[h]("onload",r)),c("mark",["firstbyte",a.getLastTimestamp()],null,"api");var b=0},{}],"wrap-function":[function(t,e,n){function r(t,e){function n(e,n,r,s,f){function nrWrapper(){var o,a,u,l;try{a=this,o=d(arguments),u="function"==typeof r?r(o,a):r||{}}catch(p){i([p,"",[o,a,s],u],t)}c(n+"start",[o,a,s],u,f);try{return l=e.apply(a,o)}catch(h){throw c(n+"err",[o,a,h],u,f),h}finally{c(n+"end",[o,a,l],u,f)}}return a(e)?e:(n||(n=""),nrWrapper[l]=e,o(e,nrWrapper,t),nrWrapper)}function r(t,e,r,i,o){r||(r="");var c,s,f,u="-"===r.charAt(0);for(f=0;f<e.length;f++)s=e[f],c=t[s],a(c)||(t[s]=n(c,u?s+r:r,i,s,o))}function c(n,r,o,a){if(!h||e){var c=h;h=!0;try{t.emit(n,r,o,e,a)}catch(s){i([s,n,r,o],t)}h=c}}return t||(t=u),n.inPlace=r,n.flag=l,n}function i(t,e){e||(e=u);try{e.emit("internal-error",t)}catch(n){}}function o(t,e,n){if(Object.defineProperty&&Object.keys)try{var r=Object.keys(t);return r.forEach(function(n){Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){return t[n]=e,e}})}),e}catch(o){i([o],n)}for(var a in t)p.call(t,a)&&(e[a]=t[a]);return e}function a(t){return!(t&&t instanceof Function&&t.apply&&!t[l])}function c(t,e){var n=e(t);return n[l]=t,o(t,n,u),n}function s(t,e,n){var r=t[e];t[e]=c(r,n)}function f(){for(var t=arguments.length,e=new Array(t),n=0;n<t;++n)e[n]=arguments[n];return e}var u=t("ee"),d=t(24),l="nr@original",p=Object.prototype.hasOwnProperty,h=!1;e.exports=r,e.exports.wrapFunction=c,e.exports.wrapInPlace=s,e.exports.argsToArray=f},{}]},{},["loader",2,12,4,3]);</script><body><header class=navbar id=mainNav><div class=navbar-inner><div class=container-fluid><a class=brand href=https://insomnia.rest/> <span> Insomnia </span> </a><button class="btn btn-navbar"data-target=.nav-collapse data-toggle=collapse type=button><span class=sr-only> Toggle Navigation </span> <span class=icon-bar> </span> <span class=icon-bar> </span> <span class=icon-bar> </span></button><div class="nav-collapse collapse"><nav role=navigation><ul class=nav><li id=home><a href=/> Home <b class=caret> </b> </a><li class=active id=core><a href=/collection/6-core> Core <b class=caret> </b> </a><li id=designer><a href=/collection/85-designer> Designer <b class=caret> </b> </a><li id=inso-cli><a href=/collection/105-inso-cli> Inso (CLI) <b class=caret> </b> </a></ul></nav></div></div></div></header><section class=container-fluid id=contentArea><div class=row-fluid><section class=span9 id=main-content><div class=contentWrapper><article id=fullArticle><h1 class=title>Authentication</h1><a aria-label="Print this Article"title="Print this article"class=printArticle href=javascript:window.print()> <i class=icon-print> </i> </a><p>There are many different authentication standards being used for HTTP today, including Basic, Digest, NTLM, API Keys, OAuth, HAWK, just to name a few. The problem is that most, if not all, of these are <strong> difficult to understand </strong> without significant research, not to mention the amount of code required to interact with them. This is where Insomnia comes to the rescue.<p>Insomnia provides a number of authentication helpers to make it trivial to interface with the most common authentication standards. Simply choose your standard, fill in some details, and Insomnia will take care of the hard work for you.<h2>Authentication Basics</h2><p>To set up authentication for a given request, select the desired authentication type from the <em> Auth </em> dropdown and fill out the required fields. <img src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7abd22c7d3a272c0d3f86/file-aRZoNda0kK.png><h2>Supported Authentication Types</h2><p>Currently, Insomnia supports then following authentication standards.<h3>Basic Authentication</h3><p>Basic authentication is one of the most basic ways to authenticate an HTTP request and is commonly used for passing API keys to authenticate popular APIs such as <a href=https://stripe.com/docs/api#authentication target=_blank> Stripe </a> , for example.<p><img alt src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7ad760428633199240d92/file-f5cMweAgNX.png><h3>Digest Authentication</h3><p>Digest is sometimes confused with Basic because it also uses a username and password, but it is much more complicated. To authenticate with a Digest endpoint, the client must send two requests instead of one. The first request sent to the server receives a nonce value, which is then used to produce a one-time-use hash key to authenticate the request. <img src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7aea32c7d3a272c0d3f99/file-ZjfEVlj9ty.png><h3>OAuth 1.0</h3><p>OAuth 1.0 provides a method for clients to access server resources on behalf of a resource owner. OAuth 1.0 is used for many popular application APIs such as Twitter.<p><img alt src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/5a0314ff0428633199244a88/file-YBVcYGzYOg.png><h3></h3><h3>OAuth 2.0</h3><p>The OAuth 2.0 authorization framework enables applications to obtain limited access to an HTTP service, usually on behalf of a resource owner. OAuth 2.0 is used for many popular application APIs such as GitHub, Facebook, Google, Dropbox, and many more.<p><img alt src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7b1440428633199240db8/file-xvKTr944OA.png><h3>Bearer Token</h3><p>The bearer token mechanism is commonly used within the OAuth 2.0 protocol and is outlined in <a href=https://tools.ietf.org/html/rfc6750> RFC6750. <br> </a><p><img alt src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7b2702c7d3a272c0d3fbd/file-QWXE0MbKVK.png><p><a href=https://tools.ietf.org/html/rfc6750> </a><h3>Microsoft NTLM</h3><p>NTLM is the authentication protocol used on networks that include systems running the Windows operating system and on stand-alone systems. More information can be found by visiting the <a href=https://msdn.microsoft.com/en-us/library/windows/desktop/aa378749(v=vs.85).aspx target=_blank> Microsoft Documentation. </a> <img src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7b2a32c7d3a272c0d3fc1/file-q5dddZMsTv.png> <a href=https://msdn.microsoft.com/en-us/library/windows/desktop/aa378749(v=vs.85).aspx> </a><h3>AWS IAM v4</h3><p>AWS IAM v4 is the mechanism used to authenticate with the AWS API. More information can be found in the <a href=http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html target=_blank> AWS Docs </a> .<p><img alt src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7b2f40428633199240dc2/file-rPwOhk3AgE.png><h3><code>
         .netrc
        </code> File</h3><p>The <code>
         .netrc
        </code> file contains login and initialization information used by the auto-login process. More information can be found <a href=https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html target=_blank> here </a> .<p class="callout-blue dashed">This authentication type requires no user input. The <code>
         .netrc
        </code> file on your computer will be located and used automatically.<h3>HAWK</h3><p><strong> Hawk </strong> is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial HTTP request cryptographic verification. More information can be found on the <a href=https://github.com/hueniverse/hawk target=_blank> HAWK Project Page </a> .<p><img alt src=//d33v4339jhl8k0.cloudfront.net/docs/assets/59e383122c7d3a40f0ed78e2/images/59f7b43e2c7d3a272c0d3fcd/file-Know5cTblI.png><h2>Conclusion</h2><p>This article introduced you to the various authentication protocols that Insomnia supports. Be sure to make use of them whenever possible, as working with them manually can be a tremendous amount of work.</article><section class=articleFoot><time class=lu datetime=2021-01-09> Last updated on January 9, 2021 </time></section></div></section><aside class=span3 id=sidebar><form action=/search autocomplete=off class=sm id=searchBar method=GET><input name=collectionId type=hidden value=59e385c9042863379ddcadfa><input class=search-query name=query placeholder=Search title=search-query><button><span class=sr-only> Toggle Search </span> <i class=icon-search> </i></button><div style="display: none;"class=sb id=serp-dd><ul class=result></ul></div></form><h3>Categories</h3><ul class="nav nav-list"><li><a href=/category/9-getting-started> Getting Started <i class=icon-arrow> </i> </a><li><a href=/category/120-security> Security <i class=icon-arrow> </i> </a><li><a href=/category/124-support> Support <i class=icon-arrow> </i> </a><li class=active><a href=/category/19-using-insomnia> Using Insomnia <i class=icon-arrow> </i> </a><li><a href=/category/31-cloud-account> Cloud Account <i class=icon-arrow> </i> </a></ul></aside></div><div id=noResults style=display:none;>No results found</div><footer><p>© <a href=https://insomnia.rest/> Insomnia </a> 2021. <span> Powered by <a href=https://www.helpscout.com/knowledge-base/?utm_source=docs&utm_medium=footerlink&utm_campaign=Docs+Branding rel=nofollow target=_blank> Help Scout </a> </span></footer></section><section class="modal hide"id=contactModal tabindex=-1><h2>Contact Us</h2><a data-dismiss=modal href=# id=closeBtn> <i class=icon-close> </i> </a><div class=modal-body><form class="form-horizontal contact"action=/contact data-parsley-validate enctype=multipart/form-data method=post novalidate><div class=control-group><label class=control-label for=md-name>Name</label><div class=controls><input id=md-name name=name placeholder=(optional)></div></div><div class=control-group><label class=control-label for=md-email>Email</label><div class=controls><input data-parsley-required-message="Email is required"data-parsley-notblank=true data-parsley-required=true data-parsley-trigger=change data-parsley-type=email id=md-email name=email type=email><input id=phone name=phone></div></div><div class=control-group><label class=control-label for=md-subject>Subject</label><div class=controls><input data-parsley-required-message="Subject is required"data-parsley-notblank=true data-parsley-required=true id=md-subject name=subject></div></div><div class=control-group><label class=control-label for=md-message>Message</label><div class=controls><textarea data-parsley-required-message="Message is required"data-parsley-notblank=true data-parsley-required=true id=md-message name=message></textarea></div></div><div class=control-group><label class=control-label for=file-upload>Upload file</label><div class=controls><input data-parsley-max-file-size=10 id=file-upload name=upload type=file></div></div><div class=form-actions><input class=btn type=submit value=Send></div></form></div></section><script src=//d3eto7onm69fcz.cloudfront.net/assets/javascripts/app3.min.js></script><script>// keep iOS links from opening safari
if(("standalone" in window.navigator) && window.navigator.standalone){
// If you want to prevent remote links in standalone web apps opening Mobile Safari, change 'remotes' to true
var noddy, remotes = false;
document.addEventListener('click', function(event) {
noddy = event.target;
while(noddy.nodeName !== "A" && noddy.nodeName !== "HTML") {
noddy = noddy.parentNode;
}

if('href' in noddy && noddy.href.indexOf('http') !== -1 && (noddy.href.indexOf(document.location.host) !== -1 || remotes)){
event.preventDefault();
document.location.href = noddy.href;
}

},false);
}
$('#contactModal').on('shown', function () {
  $('#md-name').focus();
});</script><script>window.NREUM||(NREUM={});NREUM.info={"errorBeacon":"bam-cell.nr-data.net","licenseKey":"248c08e607","agent":"","beacon":"bam-cell.nr-data.net","applicationTime":56,"applicationID":"4968967","transactionName":"YlUGMhMECxBTWkJaW1sfNAoAHCYMXE1EXFhZVRYnAhEMDFwWVVxaQUILCg0AFxAceERHXVZcARVPEwwGRQ==","queueTime":0}</script>