{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-rest/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Authentication","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"authentication","__idx":0},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authentication is handled by receiving a token from the Yellow Dog Auth API. All requests require an"," ","Authorization header with a Bearer token included. The only source for this Token is through the"," ","Yellow Dog Auth API."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As an integrator you should have received an API Client ID as well as a username and password for a"," ","Yellow Dog Inventory Database Instance."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authentication for the fetch api require an access token from the yellow dog authentication api found"," ","at ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://auth.yellowdogsoftware.com"},"children":["auth.yellowdogsoftware.com"]}]},". The two most commonly used"," ","endpoints and their usage are as followed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"access-token","__idx":1},"children":["Access Token"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"post-token","__idx":2},"children":["POST /token"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access tokens provide the ability to interact with Yellow Dog’s Web APIs."," ","To get a valid access token you’ll need to provide a userName, password, and clientId."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Valid for 1 hour"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-body","__idx":3},"children":["Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"userName\": \"string\",\n  \"password\": \"string\",\n  \"clientId\": \"string\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response","__idx":4},"children":["Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": true,\n  \"result\": {\n    \"accessToken\": \"{some access token}\",\n    \"refreshToken\": \"{some refresh token}\",\n    \"tokenType\": \"{bearer}\",\n    \"clientId\": \"{your client id}\",\n    \"expiresIn\": 3600,\n    \"expires\": \"{2018-07-23T16:04:31Z}\",\n    \"isUser\": true\n  },\n  \"errors\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"id":"refreshToken"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"refresh-token","__idx":5},"children":["Refresh Token"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"post-refreshtoken","__idx":6},"children":["POST /refreshToken"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refresh tokens are used to get a new access token without having to resubmit user credentials."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Valid for 30 days. After 30 days, you’ll have to resubmit user credentials."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Can only be used once.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-body-1","__idx":7},"children":["Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"refreshToken\": \"{some refresh token}\", // \"2ecet06a-bd6a-4f94-a24a-452zt5f2c999\"\n  \"clientId\": \"{your client id}\" // \"123456\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response-1","__idx":8},"children":["Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": true,\n  \"result\": {\n    \"accessToken\": \"{some access token}\",\n    \"refreshToken\": \"{some refresh token}\",\n    \"tokenType\": \"{bearer}\",\n    \"clientId\": \"{your client id}\",\n    \"expiresIn\": 3600,\n    \"expires\": \"{2018-07-23T16:06:35Z}\",\n    \"isUser\": true\n  },\n  \"errors\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"id":"pagination"},"children":[]}]},"headings":[{"value":"Authentication","id":"authentication","depth":1},{"value":"Access Token","id":"access-token","depth":3},{"value":"POST /token","id":"post-token","depth":4},{"value":"Request Body","id":"request-body","depth":5},{"value":"Response","id":"response","depth":5},{"value":"Refresh Token","id":"refresh-token","depth":3},{"value":"POST /refreshToken","id":"post-refreshtoken","depth":4},{"value":"Request Body","id":"request-body-1","depth":5},{"value":"Response","id":"response-1","depth":5}],"frontmatter":{"seo":{"title":"Authentication"}},"lastModified":"2026-03-16T22:30:18.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/rest/user-guide/01-authentication","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}