[{"data":1,"prerenderedAt":324},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fauthentication":12,"\u002Fdocs\u002Fauthentication-surround":320},[4,8],{"title":5,"path":6,"stem":7},"Getting started","\u002Fdocs\u002Fgetting-started","1.docs\u002F1.getting-started",{"title":9,"path":10,"stem":11},"Authentication","\u002Fdocs\u002Fauthentication","1.docs\u002F2.authentication",{"id":13,"title":9,"body":14,"description":315,"extension":316,"meta":317,"navigation":115,"path":10,"seo":318,"stem":11,"__hash__":319},"docs\u002F1.docs\u002F2.authentication.md",{"type":15,"value":16,"toc":310},"minimark",[17,21,26,52,55,66,69,73,76,167,171,174,204,214,306],[18,19,20],"p",{},"The ChatMonster API uses API tokens. Send yours as a bearer token on every request.",[22,23,25],"h2",{"id":24},"create-an-api-token","Create an API token",[27,28,29,41,49],"ol",{},[30,31,32,33,40],"li",{},"Sign in to ",[34,35,39],"a",{"href":36,"rel":37},"https:\u002F\u002Fapp.chatmonster.com\u002Flogin",[38],"nofollow","app.chatmonster.com",".",[30,42,43,44,40],{},"Go to ",[34,45,48],{"href":46,"rel":47},"https:\u002F\u002Fapp.chatmonster.com\u002Fuser\u002Fapi-tokens",[38],"API Tokens",[30,50,51],{},"Name the token and create it. Copy it right away, because it won't be shown again.",[18,53,54],{},"Treat tokens like passwords. Keep them on your server, never in browser code or a public repository. If a token leaks, delete it on the same page and create a new one.",[56,57,62],"pre",{"className":58,"code":60,"language":61},[59],"language-text","Authorization: Bearer YOUR_API_TOKEN\n","text",[63,64,60],"code",{"__ignoreMap":65},"",[18,67,68],{},"A token acts as the user who created it, so it can reach the same organizations that user can. Tokens don't expire on their own, so delete any you no longer use.",[22,70,72],{"id":71},"find-your-organization-id","Find your organization ID",[18,74,75],{},"List the organizations your token can access. This request doesn't need an organization header:",[77,78,79],"code-group",{},[56,80,85],{"className":81,"code":82,"filename":83,"language":84,"meta":65,"style":65},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","CHATMONSTER_TOKEN=\"your API token\"\n\ncurl \"https:\u002F\u002Fapi.chatmonster.com\u002Fv1\u002Forganizations\" \\\n  -H \"Authorization: Bearer $CHATMONSTER_TOKEN\" \\\n  -H 'Accept: application\u002Fjson'\n","CURL","bash",[63,86,87,110,117,135,153],{"__ignoreMap":65},[88,89,92,96,100,103,107],"span",{"class":90,"line":91},"line",1,[88,93,95],{"class":94},"sTEyZ","CHATMONSTER_TOKEN",[88,97,99],{"class":98},"sMK4o","=",[88,101,102],{"class":98},"\"",[88,104,106],{"class":105},"sfazB","your API token",[88,108,109],{"class":98},"\"\n",[88,111,113],{"class":90,"line":112},2,[88,114,116],{"emptyLinePlaceholder":115},true,"\n",[88,118,120,124,127,130,132],{"class":90,"line":119},3,[88,121,123],{"class":122},"sBMFI","curl",[88,125,126],{"class":98}," \"",[88,128,129],{"class":105},"https:\u002F\u002Fapi.chatmonster.com\u002Fv1\u002Forganizations",[88,131,102],{"class":98},[88,133,134],{"class":94}," \\\n",[88,136,138,141,143,146,149,151],{"class":90,"line":137},4,[88,139,140],{"class":105},"  -H",[88,142,126],{"class":98},[88,144,145],{"class":105},"Authorization: Bearer ",[88,147,148],{"class":94},"$CHATMONSTER_TOKEN",[88,150,102],{"class":98},[88,152,134],{"class":94},[88,154,156,158,161,164],{"class":90,"line":155},5,[88,157,140],{"class":105},[88,159,160],{"class":98}," '",[88,162,163],{"class":105},"Accept: application\u002Fjson",[88,165,166],{"class":98},"'\n",[22,168,170],{"id":169},"choose-the-organization","Choose the organization",[18,172,173],{},"A token can have access to more than one organization, so requests for organization data also say which one they're for.",[175,176,177,190],"table",{},[178,179,180],"thead",{},[181,182,183,187],"tr",{},[184,185,186],"th",{},"Header",[184,188,189],{},"Value",[191,192,193],"tbody",{},[181,194,195,201],{},[196,197,198],"td",{},[63,199,200],{},"X-ChatMonster-Organization-Id",[196,202,203],{},"Your ChatMonster organization ID.",[18,205,206,207,210,211,40],{},"A request without this header gets a ",[63,208,209],{},"400"," response, and the token's user must belong to the organization or the request gets a ",[63,212,213],{},"403",[77,215,216],{},[56,217,219],{"className":81,"code":218,"filename":83,"language":84,"meta":65,"style":65},"CHATMONSTER_TOKEN=\"your API token\"\nCHATMONSTER_ORG_ID=\"your organization id\"\n\ncurl \"https:\u002F\u002Fapi.chatmonster.com\u002Fv1\u002Flocations\" \\\n  -H \"Authorization: Bearer $CHATMONSTER_TOKEN\" \\\n  -H \"X-ChatMonster-Organization-Id: $CHATMONSTER_ORG_ID\" \\\n  -H 'Accept: application\u002Fjson'\n",[63,220,221,233,247,251,264,278,295],{"__ignoreMap":65},[88,222,223,225,227,229,231],{"class":90,"line":91},[88,224,95],{"class":94},[88,226,99],{"class":98},[88,228,102],{"class":98},[88,230,106],{"class":105},[88,232,109],{"class":98},[88,234,235,238,240,242,245],{"class":90,"line":112},[88,236,237],{"class":94},"CHATMONSTER_ORG_ID",[88,239,99],{"class":98},[88,241,102],{"class":98},[88,243,244],{"class":105},"your organization id",[88,246,109],{"class":98},[88,248,249],{"class":90,"line":119},[88,250,116],{"emptyLinePlaceholder":115},[88,252,253,255,257,260,262],{"class":90,"line":137},[88,254,123],{"class":122},[88,256,126],{"class":98},[88,258,259],{"class":105},"https:\u002F\u002Fapi.chatmonster.com\u002Fv1\u002Flocations",[88,261,102],{"class":98},[88,263,134],{"class":94},[88,265,266,268,270,272,274,276],{"class":90,"line":155},[88,267,140],{"class":105},[88,269,126],{"class":98},[88,271,145],{"class":105},[88,273,148],{"class":94},[88,275,102],{"class":98},[88,277,134],{"class":94},[88,279,281,283,285,288,291,293],{"class":90,"line":280},6,[88,282,140],{"class":105},[88,284,126],{"class":98},[88,286,287],{"class":105},"X-ChatMonster-Organization-Id: ",[88,289,290],{"class":94},"$CHATMONSTER_ORG_ID",[88,292,102],{"class":98},[88,294,134],{"class":94},[88,296,298,300,302,304],{"class":90,"line":297},7,[88,299,140],{"class":105},[88,301,160],{"class":98},[88,303,163],{"class":105},[88,305,166],{"class":98},[307,308,309],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":65,"searchDepth":112,"depth":112,"links":311},[312,313,314],{"id":24,"depth":112,"text":25},{"id":71,"depth":112,"text":72},{"id":169,"depth":112,"text":170},"Authenticate with an API token and tell ChatMonster which organization a request is for.","md",{"category":9,"position":112,"version":91},{"title":9,"description":315},"ymfb1QSFS5VnjiRuEvdS13je9uETpklPYUJbunBIMVs",[321,323],{"title":5,"path":6,"stem":7,"description":322,"children":-1},"Connect your own systems to ChatMonster with the REST API.",null,1793401338567]