[{"data":1,"prerenderedAt":303},["ShallowReactive",2],{"doc-article-getting-started-authentication":3,"doc-siblings-getting-started":295},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"category":5,"order":10,"difficulty":11,"time_to_complete":12,"related":13,"code_curl":16,"code_node":17,"code_python":18,"code_go":19,"body":20,"_type":289,"_id":290,"_source":291,"_file":292,"_stem":293,"_extension":294},"\u002Fdeveloper\u002Fgetting-started\u002Fauthentication","getting-started",false,"","Authentication","Secure your API requests using permanent Bearer tokens generated from the client portal.",2,"beginner","3 minutes",[14,15],"\u002Fdocs\u002Fgetting-started\u002Fintroduction","\u002Fdocs\u002Fgetting-started\u002Frate-limits","# Authenticate request via Authorization Header\ncurl -X GET \"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fprofile\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"\n","\u002F\u002F Call authenticated endpoint using Axios\nconst axios = require('axios');\n\naxios.get('https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fprofile', {\n  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }\n})\n.then(res => console.log('Profile details:', res.data))\n.catch(err => console.error('Auth Error:', err.message));\n","# Fetch profile using requests in Python\nimport requests\n\nheaders = { \"Authorization\": \"Bearer YOUR_API_KEY\" }\nres = requests.get(\"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fprofile\", headers=headers)\nprint(\"Profile details:\", res.json())\n","\u002F\u002F Fetch profile in Go\npackage main\n\nimport (\n    \"fmt\"\n    \"net\u002Fhttp\"\n    \"io\"\n)\n\nfunc main() {\n    req, _ := http.NewRequest(\"GET\", \"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fprofile\", nil)\n    req.Header.Set(\"Authorization\", \"Bearer YOUR_API_KEY\")\n    \n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    \n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(\"Profile:\", string(body))\n}\n",{"type":21,"children":22,"toc":284},"root",[23,32,46,53,127,142,148,161,173,179,192],{"type":24,"tag":25,"props":26,"children":28},"element","h1",{"id":27},"authenticating-your-requests",[29],{"type":30,"value":31},"text","Authenticating Your Requests",{"type":24,"tag":33,"props":34,"children":35},"p",{},[36,38,44],{"type":30,"value":37},"The AISoule REST API enforces secure, modern key authentication. Every outbound network query must provide a valid ",{"type":24,"tag":39,"props":40,"children":41},"strong",{},[42],{"type":30,"value":43},"Bearer API Key",{"type":30,"value":45}," in its headers.",{"type":24,"tag":47,"props":48,"children":50},"h2",{"id":49},"generating-an-api-key",[51],{"type":30,"value":52},"Generating an API Key",{"type":24,"tag":54,"props":55,"children":56},"ol",{},[57,79,91,103,122],{"type":24,"tag":58,"props":59,"children":60},"li",{},[61,63,68,70,77],{"type":30,"value":62},"Log in to your commercial ",{"type":24,"tag":39,"props":64,"children":65},{},[66],{"type":30,"value":67},"AISoule Dashboard",{"type":30,"value":69}," (",{"type":24,"tag":71,"props":72,"children":74},"code",{"className":73},[],[75],{"type":30,"value":76},"https:\u002F\u002Fapp.aisoule.com",{"type":30,"value":78},").",{"type":24,"tag":58,"props":80,"children":81},{},[82,84,89],{"type":30,"value":83},"Navigate to the sidebar settings gear: ",{"type":24,"tag":39,"props":85,"children":86},{},[87],{"type":30,"value":88},"Settings → Developer API Keys",{"type":30,"value":90},".",{"type":24,"tag":58,"props":92,"children":93},{},[94,96,101],{"type":30,"value":95},"Click the ",{"type":24,"tag":39,"props":97,"children":98},{},[99],{"type":30,"value":100},"\"Generate New Token\"",{"type":30,"value":102}," button.",{"type":24,"tag":58,"props":104,"children":105},{},[106,108,114,116,121],{"type":30,"value":107},"Add a descriptive label (e.g., ",{"type":24,"tag":109,"props":110,"children":111},"em",{},[112],{"type":30,"value":113},"Staging Server",{"type":30,"value":115},", ",{"type":24,"tag":109,"props":117,"children":118},{},[119],{"type":30,"value":120},"Production Dialer",{"type":30,"value":78},{"type":24,"tag":58,"props":123,"children":124},{},[125],{"type":30,"value":126},"Copy the secure secret key immediately.",{"type":24,"tag":128,"props":129,"children":130},"blockquote",{},[131],{"type":24,"tag":33,"props":132,"children":133},{},[134,140],{"type":24,"tag":135,"props":136,"children":137},"span",{},[138],{"type":30,"value":139},"!WARNING",{"type":30,"value":141},"\nFor security, API keys are shown only once at generation time. Store them in a secure environment variables configuration vaults (like HashiCorp Vault or AWS Secrets Manager).",{"type":24,"tag":47,"props":143,"children":145},{"id":144},"authentication-header-format",[146],{"type":30,"value":147},"Authentication Header Format",{"type":24,"tag":33,"props":149,"children":150},{},[151,153,159],{"type":30,"value":152},"All REST requests must include your key in the standard HTTP ",{"type":24,"tag":71,"props":154,"children":156},{"className":155},[],[157],{"type":30,"value":158},"Authorization",{"type":30,"value":160}," header exactly as shown:",{"type":24,"tag":162,"props":163,"children":168},"pre",{"className":164,"code":166,"language":167,"meta":7},[165],"language-http","Authorization: Bearer YOUR_API_KEY\n","http",[169],{"type":24,"tag":71,"props":170,"children":171},{"__ignoreMap":7},[172],{"type":30,"value":166},{"type":24,"tag":47,"props":174,"children":176},{"id":175},"troubleshooting-authentication-errors",[177],{"type":30,"value":178},"Troubleshooting Authentication Errors",{"type":24,"tag":33,"props":180,"children":181},{},[182,184,190],{"type":30,"value":183},"If your API key is misconfigured or has been revoked, the request returns a standard ",{"type":24,"tag":71,"props":185,"children":187},{"className":186},[],[188],{"type":30,"value":189},"401 Unauthorized",{"type":30,"value":191}," code:",{"type":24,"tag":193,"props":194,"children":195},"table",{},[196,221],{"type":24,"tag":197,"props":198,"children":199},"thead",{},[200],{"type":24,"tag":201,"props":202,"children":203},"tr",{},[204,211,216],{"type":24,"tag":205,"props":206,"children":208},"th",{"align":207},"left",[209],{"type":30,"value":210},"Status Code",{"type":24,"tag":205,"props":212,"children":213},{"align":207},[214],{"type":30,"value":215},"Error Code",{"type":24,"tag":205,"props":217,"children":218},{"align":207},[219],{"type":30,"value":220},"Reason",{"type":24,"tag":222,"props":223,"children":224},"tbody",{},[225,258],{"type":24,"tag":201,"props":226,"children":227},{},[228,237,246],{"type":24,"tag":229,"props":230,"children":231},"td",{"align":207},[232],{"type":24,"tag":71,"props":233,"children":235},{"className":234},[],[236],{"type":30,"value":189},{"type":24,"tag":229,"props":238,"children":239},{"align":207},[240],{"type":24,"tag":71,"props":241,"children":243},{"className":242},[],[244],{"type":30,"value":245},"unauthorized",{"type":24,"tag":229,"props":247,"children":248},{"align":207},[249,251,256],{"type":30,"value":250},"The ",{"type":24,"tag":71,"props":252,"children":254},{"className":253},[],[255],{"type":30,"value":158},{"type":30,"value":257}," header is missing, malformed, or the token has been revoked.",{"type":24,"tag":201,"props":259,"children":260},{},[261,270,279],{"type":24,"tag":229,"props":262,"children":263},{"align":207},[264],{"type":24,"tag":71,"props":265,"children":267},{"className":266},[],[268],{"type":30,"value":269},"403 Forbidden",{"type":24,"tag":229,"props":271,"children":272},{"align":207},[273],{"type":24,"tag":71,"props":274,"children":276},{"className":275},[],[277],{"type":30,"value":278},"forbidden",{"type":24,"tag":229,"props":280,"children":281},{"align":207},[282],{"type":30,"value":283},"The token has correct auth but lacks the required permissions scope to query the resource.",{"title":7,"searchDepth":10,"depth":10,"links":285},[286,287,288],{"id":49,"depth":10,"text":52},{"id":144,"depth":10,"text":147},{"id":175,"depth":10,"text":178},"markdown","content:developer:getting-started:authentication.md","content","developer\u002Fgetting-started\u002Fauthentication.md","developer\u002Fgetting-started\u002Fauthentication","md",[296,297,300],{"_path":4,"title":8},{"_path":298,"title":299},"\u002Fdeveloper\u002Fgetting-started\u002Fintroduction","Introduction",{"_path":301,"title":302},"\u002Fdeveloper\u002Fgetting-started\u002Frate-limits","Rate Limits",1780423178036]