{"items":[{"type":"link","label":"Authenticate","link":"/token","routeSlug":"/token","content":{"contentType":"overview","meta":{"name":"Authenticate"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"token.json","url":"/_bundle/token.json?download"},{"kind":"download","label":"token.yaml","url":"/_bundle/token.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://api.blackbird.ai"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Authenticate","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"tag","tag":"html","attributes":{"name":"h2","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"An API for retrieving your access token for authentication."},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This guide will help you connect to our API using OAuth authentication. This document will guide you through setting up and using these authentication methods in your preferred programming language. For reference, you can also try out your authentication and the entire API in the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://api.blackbird.ai/compass/openapi/#/ContextChecks"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OpenAPI Spec"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Prerequisites"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Before you begin, ensure you have the following:"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"-A Blackbird AI account."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"-Your client credentials (Client ID and Client Secret) for the Client Credentials flow."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"-(Not reccommended in a production integration) Alternatively for trying out the API, your Compass Application username + password."},"children":[]}]}]}]}],"sectionId":"/token"}],"sectionId":"/token"}]}]}},{"label":"Get token","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/token/other/token","routeSlug":"/token/other/token","metadata":{"seo":{"title":"Get token","description":"Exchange client credentials for an access token."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"token","name":"Get token","isWebhook":false,"pointer":"/paths/~1auth~1oauth2~1token/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get token","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Exchange client credentials for an access token."},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"schema_82"}},"schemaId":"schema_82","pointer":"/paths/~1auth~1oauth2~1token/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/auth/oauth2/token","servers":[{"url":"https://api.blackbird.ai"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"requestBody":{"application/x-www-form-urlencoded":{"schemaId":"schema_82"}},"responseCodes":["200","400"],"pointer":"/auth/oauth2/token","href":"other/token","openApiOperationId":"token","summary":"Get token"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.blackbird.ai"}],"schemaId":"schema_82","mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"schema_82"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Access token returned successfully.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_83"}},"schemaId":"schema_83"},{"code":"400","description":"Bad Request - Missing or invalid parameters.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_84"}},"schemaId":"schema_84"}],"pointer":"/paths/~1auth~1oauth2~1token/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_83","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_83"}}},{"code":"400","schemaId":"schema_84","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_84"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/token"}],"panels":[]}]},"httpPath":"/auth/oauth2/token"},{"label":"Get token via password grant","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/token/other/passwordgranttoken","routeSlug":"/token/other/passwordgranttoken","metadata":{"seo":{"title":"Get token via password grant","description":"Exchange username password via password OAuth grant for an access token."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"passwordGrantToken","name":"Get token via password grant","isWebhook":false,"pointer":"/paths/~1compass~1token/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get token via password grant","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Exchange username password via password OAuth grant for an access token."},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"schema_85"}},"schemaId":"schema_85","pointer":"/paths/~1compass~1token/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/compass/token","servers":[{"url":"https://api.blackbird.ai"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"requestBody":{"application/x-www-form-urlencoded":{"schemaId":"schema_85"}},"responseCodes":["200","400"],"pointer":"/compass/token","href":"other/passwordgranttoken","openApiOperationId":"passwordGrantToken","summary":"Get token via password grant"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.blackbird.ai"}],"schemaId":"schema_85","mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"schema_85"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Access token returned successfully.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_83"}},"schemaId":"schema_83"},{"code":"400","description":"Bad Request - Missing or invalid parameters.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_86"}},"schemaId":"schema_86"}],"pointer":"/paths/~1compass~1token/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_83","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_83"}}},{"code":"400","schemaId":"schema_86","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_86"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/passwordgranttoken"}],"panels":[]}]},"httpPath":"/compass/token"}],"store":{"schemaStore":{"schema_82":{"kind":"json-schema","data":{"type":"object","properties":{"grant_type":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The grant type. The only valid value right now is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_credentials"},"children":[]}]}]}],"enum":["client_credentials"]},"client_id":{"type":"string","description":"Your application's client ID."},"client_secret":{"type":"string","description":"Your application's client secret."}},"example":{"grant_type":"client_credentials","client_id":"your_client_id","client_secret":"your_client_secret"}},"id":"schema_82"},"schema_83":{"kind":"json-schema","data":{"type":"object","properties":{"access_token":{"type":"string","description":"The access token to use for API requests."},"token_type":{"type":"string","description":"Token type, typically \"Bearer\"."},"expires_in":{"type":"integer","description":"Time in seconds until the access token expires."}},"example":{"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","token_type":"Bearer","expires_in":3600}},"id":"schema_83"},"schema_84":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","description":"Error code."},"error_description":{"type":"string","description":"Description of the error."}}},"id":"schema_84"},"schema_85":{"kind":"json-schema","data":{"type":"object","properties":{"grant_type":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The grant type. The only valid value right now is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"password"},"children":[]}]}]}],"enum":["password"]},"username":{"type":"string","description":"Your compass username"},"password":{"type":"string","description":"Your compass password"}},"example":{"grant_type":"password","username":"myEmail@gmail.com","password":"myP@ssword123"}},"id":"schema_85"},"schema_86":{"kind":"json-schema","data":{"type":"object","properties":{"error_code":{"type":"string","description":"Error code."},"msg":{"type":"string","description":"Description of the error."}}},"id":"schema_86"}},"exampleStore":{},"securitySchemeStore":{},"servers":[{"url":"https://api.blackbird.ai"}]},"options":{"hideSidebar":true,"mockServer":{"url":"/_mock/token","position":"off","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/token.json?download"},{"url":"/_bundle/token.yaml?download"}],"excludeFromSearch":false,"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Authenticate","description":"<h2>An API for retrieving your access token for authentication.</h2>\n\nThis guide will help you connect to our API using OAuth authentication. This document will guide you through setting up and using these authentication methods in your preferred programming language. For reference, you can also try out your authentication and the entire API in the [OpenAPI Spec](https://api.blackbird.ai/compass/openapi/#/ContextChecks).\n\n\n<b>Prerequisites</b>\n\nBefore you begin, ensure you have the following:\n\n\n-A Blackbird AI account.\n\n-Your client credentials (Client ID and Client Secret) for the Client Credentials flow.\n\n-(Not reccommended in a production integration) Alternatively for trying out the API, your Compass Application username + password."}},"baseSlug":"/token","routesMapping":{}}