{"items":[{"type":"link","label":"Cropster OAuth API","link":"/api/oauth/oauth-api","routeSlug":"/api/oauth/oauth-api","content":{"contentType":"overview","meta":{"name":"Cropster OAuth API"},"children":[{"nodeType":"container","panels":[{"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://auth.cropster.com"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Cropster OAuth API (1.0)","showPageActions":true}],"sectionId":"/api/oauth/oauth-api"}]}]}},{"type":"group","label":"OAuth","link":"/api/oauth/oauth-api/oauth","routeSlug":"/api/oauth/oauth-api/oauth","items":[{"label":"Obtain OAuth2 access token using client credentials grant","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/api/oauth/oauth-api/oauth/oauth2token","routeSlug":"/api/oauth/oauth-api/oauth/oauth2token","metadata":{"seo":{"title":"Obtain OAuth2 access token using client credentials grant","description":"Obtain OAuth2 access token using client credentials grant"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"oauth2Token","name":"Obtain OAuth2 access token using client credentials grant","isWebhook":false,"pointer":"/paths/~1oauth2~1token/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Obtain OAuth2 access token using client credentials grant","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/oauth2TokenRequest"}},"schemaId":"components/schemas/oauth2TokenRequest","pointer":"/paths/~1oauth2~1token/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/oauth2/token","servers":[{"url":"https://auth.cropster.com"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"requestBody":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/oauth2TokenRequest"}},"responseCodes":["200","400"],"pointer":"/oauth2/token","href":"oauth/oauth2token","openApiOperationId":"oauth2Token","summary":"Obtain OAuth2 access token using client credentials grant"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://auth.cropster.com"}],"schemaId":"components/schemas/oauth2TokenRequest","mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/oauth2TokenRequest"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"http status 200","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/oauth2TokenResponse"}},"schemaId":"components/schemas/oauth2TokenResponse"},{"code":"400","description":"http status 400"}],"pointer":"/paths/~1oauth2~1token/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/oauth2TokenResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/oauth2TokenResponse"}}},{"code":"400"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/oauth/oauth2token"}],"panels":[]}]},"httpPath":"/oauth2/token"}],"content":{"contentType":"group","meta":{"name":"OAuth"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"OAuth","showPageActions":true}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/oauth2/token","summary":"Obtain OAuth2 access token using client credentials grant","prefix":{"name":"post","color":"post"},"badges":[],"link":"/oauth/oauth2token","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/oauth2TokenRequest":{"id":"components/schemas/oauth2TokenRequest","kind":"json-schema","title":"oauth2TokenRequest","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":"OAuth grant type must be set to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_credentials"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"client_credentials"},"client_id":{"type":"string","description":"OAuth client ID that was generated when the service account was created.","example":"<CLIENT_ID>"},"client_secret":{"type":"string","description":"OAuth client secret that was generated when the service account was created.","example":"<CLIENT_SECRET>"},"scope":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth scopes separated by url-encoded whitespaces ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"%20"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). Only scopes that were granted to the service account can be requested here."},"children":[]}]}]}],"example":"inventory.green%20inventory.roast%20inventory.blend"}}}},"components/schemas/oauth2TokenResponse":{"id":"components/schemas/oauth2TokenResponse","kind":"json-schema","title":"oauth2TokenResponse","data":{"type":"object","properties":{"access_token":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth access token that must be used in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Bearer <ACCESS_TOKEN>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"client_credentials"},"expires_in":{"type":"integer","description":"Lifetime in seconds of the access token.","example":28799},"scope":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A string containing the list of permissions granted to the token. Scopes are delimited by a URL-encoded space ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"%20"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). Note: To get an array of scopes, you must first URL-decode the string and then split it by the space character."},"children":[]}]}]}],"example":"inventory.green%20inventory.roast%20inventory.blend"},"token_type":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Type of the issued token. The value is always "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Bearer"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"Bearer"}}}}},"exampleStore":{},"securitySchemeStore":{},"servers":[{"url":"https://auth.cropster.com"}],"specType":"openapi"},"options":{"hideDownloadButtons":true,"jsonSamplesExpandLevel":"all","schemasExpansionLevel":2,"hidePropertiesPrefix":true,"layout":"three-panel","hideSchemaTitles":true,"hideReplay":true,"excludeFromSearch":true,"mockServer":{"off":true},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/api/oauth/oauth-api.json?download"},{"url":"/_bundle/api/oauth/oauth-api.yaml?download"}],"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Cropster OAuth API"}},"baseSlug":"/api/oauth/oauth-api","routesMapping":{}}