{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Client ID & Secret","description":"The best API documentation generator ever.","siteUrl":"https://developer.lytx.com","keywords":"redocly developer portal, api portal starter, api reference docs","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"client-id--secret","__idx":0},"children":["Client ID & Secret"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If someone has already given you a client ID and client secret, you don't need to sign in to the Developer Portal to use them. Use them directly to get a token, then use that token on every API call."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Get your client ID and client secret from whoever created the service account for you. Store the secret somewhere safe, you won't be able to see it again later."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Call the token endpoint with both values:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"curl --location 'https://api.lytx.com/api/serviceaccount/token' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"clientId\": \"<your_client_id>\",\n    \"clientSecret\": \"<your_secret>\"\n  }'\n"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The response gives you a short-lived token (a JWT). Use this token as a Bearer token on every API call you make."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When the token expires, call the same endpoint again to get a new one. Don't try to reuse an old, expired token."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This page doesn't require signing in. If you need to create your own service account instead of using one someone gave you, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/new_signed_in_experience_client_credentials"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Self-Serve Client Credentials"]}]},"."]}]},"headings":[{"value":"Client ID & Secret","id":"client-id--secret","depth":1}],"frontmatter":{"seo":{"title":"Client ID & Secret"}},"lastModified":"2026-11-09T09:43:00.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/authentication_client_credentials","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}