{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/identity-access-management/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial","admonition"]},"type":"markdown"},"seo":{"title":"Access keys | Sinch","siteUrl":"https://developers.sinch.com","llmstxt":{"title":"Sinch Developer Documentation","description":"LLMs.txt containing a map of all the documentation files for Sinch.","sections":[{"title":"Numbers API","description":"The Numbers API enables you to search for, view, and activate numbers. It's considered a precursor to other APIs in the Sinch product family. The numbers API can be used in tandem with any of our APIs that perform messaging or calling.","includeFiles":["docs/numbers/**/*.md","docs/numbers/**/*.yaml"],"excludeFiles":["docs/numbers/index.md"]},{"title":"Conversation API","description":"Send and receive messages globally on many popular channels with ease and confidence when using Sinch's Conversation API. Conversation API is the preferred API for sending mobile messages on SMS and other social channels with Sinch. It is a simple API with unified error messages, consistent request payloads, and common webhook payloads that are channel-agnostic.","includeFiles":["docs/conversation/**/*.md","docs/conversation/**/*.yaml"],"excludeFiles":["docs/conversation/index.md"]},{"title":"Voice API","description":"The Voice API works as a big telephony switch. The Voice API handles incoming phone calls (also known as incoming call “legs”), sets up outgoing phone calls (or outgoing call “legs”), and bridges the two. The incoming call leg may come in over a data connection (from a smartphone or web application using the Sinch SDKs) or through a local phone number (from the PSTN network). Similarly, the outgoing call leg can be over data (to another smartphone or web application using the Sinch SDKs) or the PSTN network.","includeFiles":["docs/voice/**/*.md","docs/voice/**/*.yaml"],"excludeFiles":["docs/voice/index.md"]},{"title":"Verification API","description":"The Verification API is a platform for phone number verification. It consists of the API and different software development kits (the Sinch SDKs) that you integrate with your smartphone or web application and cloud based back-end services. Together they enable SMS, Flashcall, Phone Call and Data verification in your application.","includeFiles":["docs/verification/**/*.md","docs/verification/**/*.yaml"],"excludeFiles":["docs/verification/index.md"]},{"title":"Provisioning API","description":"Provisioning API allows you to programmatically set up your senders, accounts and templates on your favorite messaging platforms on the Conversation API. For now, you can create your first WhatsApp channel through Meta's Embedded sign up, you can configure your first SMS App and configure your webhooks. As development continues, we will be adding the most commonly used channels.","includeFiles":["docs/provisioning-api/**/*.md","docs/provisioning-api/**/*.json"],"excludeFiles":["docs/provisioning-api/index.md"]},{"title":"Elastic SIP Trunking API","description":"With Elastic SIP Trunking you can create and manage your SIP trunks and phone numbers programmatically.","includeFiles":["docs/est/**/*.md","docs/est/**/*.yaml"],"excludeFiles":["docs/est/index.md"]},{"title":"Fax API","description":"Send and receive HIPAA compliant faxes on our modern fax platform using our developer-friendly API.","includeFiles":["docs/fax/**/*.md","docs/fax/**/*.yaml"],"excludeFiles":["docs/fax/index.md"]},{"title":"In-app Voice and Video SDK","description":"The In-app Voice and Video SDK enables you to add voice and video calling capabilities directly into your mobile or web application using the Sinch SDKs.","includeFiles":["docs/in-app-calling/**/*.md"],"excludeFiles":["docs/in-app-calling/index.md"]},{"title":"Number Lookup API","description":"The Number Lookup API is designed to provide in-depth information about phone numbers, helping enterprises enhance their communication strategies and prevent fraud. By identifying the type of phone line (for example, mobile, landline, VoIP) and the associated carrier, the API allows businesses to optimize routing, reduce unnecessary costs, and improve customer engagement.","includeFiles":["docs/number-lookup-api-v2/**/*.md","docs/number-lookup-api-v2/**/*.yaml"],"excludeFiles":["docs/number-lookup-api-v2/index.md"]},{"title":"Functions","description":"Serverless compute for voice and messaging. Deploy your code and Sinch routes live calls and messages to it — no infrastructure to run.","includeFiles":["docs/functions/functions/**/*.md","docs/functions/concepts/**/*.md","docs/functions/reference/**/*.md"],"excludeFiles":["docs/functions/functions/index.md"]},{"title":"CLI","description":"One command line for every Sinch API and the full Functions lifecycle — scaffold, run locally, deploy, and manage.","includeFiles":["docs/functions/cli/**/*.md"],"excludeFiles":["docs/functions/cli/index.md"]}]},"description":"Learn about how to create and use access keys."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"access-keys","__idx":0},"children":["Access keys"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"ConnectButton","attributes":{"title":"Sinch Agentic Tools","icon":"aiCode","option":[{"title":"Sinch Plugins","description":"Install Sinch Plugins","icon":"connection","link":"https://github.com/sinch/sinch-plugins#installation"},{"title":"Sinch Skills","description":"Install Sinch Skills","icon":"ai","link":"https://github.com/sinch/skills#installation"}]},"children":[]}," ",{"$$mdtype":"Tag","name":"ConnectButton","attributes":{"title":"Sinch SDKs","icon":"code","option":[{"title":"Sinch Node.js SDK","description":"Install Sinch Node.js SDK","icon":"node","link":"/docs/sdks/node#installation"},{"title":"Sinch Java SDK","description":"Install Sinch Java SDK","icon":"java","link":"/docs/sdks/java#installation"},{"title":"Sinch .NET SDK","description":"Install Sinch .NET SDK","icon":"dotnet","link":"/docs/sdks/dotnet#installation"},{"title":"Sinch Python SDK","description":"Install Sinch Python SDK","icon":"python","link":"/docs/sdks/python#installation"}]},"children":[]}," ",{"$$mdtype":"Tag","name":"ConnectButton","attributes":{"title":"Sinch CLI & Functions","icon":"window","option":[{"title":"Sinch CLI","description":"Install Sinch CLI","icon":"cli","link":"/docs/functions/cli/installation"},{"title":"Sinch Functions","description":"Quickstart Sinch Functions","icon":"code","link":"/docs/functions/functions/quickstart"}]},"children":[]}," ",{"$$mdtype":"Tag","name":"ConnectMCP","attributes":{"placement":"bottom","alignment":"start","options":["cursor","vscode","copy"]},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An access key is the credential the Sinch APIs use to authenticate. Each key is a pair:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Key ID is a public identifier (also used as the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]},"). It's safe to log and share internally."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Key Secret is the private half (the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]},"). Treat it like a password."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You don't send the access key directly on API requests. Instead, you exchange it for a short-lived OAuth2 access token (see OAuth2 access tokens) and send that token as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bearer"]}," credential."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access keys are scoped to a single project. A key can only act on resources in the project it was created in, and a project can hold a maximum of 10 access keys."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This also applies to any of the project’s subprojects – a key created in a project can also act on resources within any of that project’s subprojects."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once generated, the access token includes a lifetime field indicating its validity period (which is configured to expire after one hour)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-an-access-key","__idx":1},"children":["Create an access key"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sign in to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dashboard.sinch.com"},"children":["Sinch Build Dashboard"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["project switcher"]}," to select the project the key should belong to."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings → Access keys"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create access key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter a display name describing what the key is for (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numbers-prod-worker"]},"). A display name is required."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Confirm"]},", then copy the Key ID and Key Secret."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important!"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Copy your Key Secret now! The Key Secret is only viewable at the time of initial creation. Copy it immediately and store it somewhere secure. If you lose it, you'll need to create a new key pair. The Key ID can always be looked up later."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-an-access-key","__idx":2},"children":["Use an access key"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass the Key ID and Key Secret to the OAuth2 token endpoint to get a bearer token:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"curl https://auth.sinch.com/oauth2/token \\\n  -X POST \\\n  -d \"grant_type=client_credentials\" \\\n  -u \"YOUR_key_id:YOUR_key_secret\"\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Placeholder"},"children":["Placeholder"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YOUR_key_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key's public identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YOUR_key_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key's secret half."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response contains an access_token you then send on API calls. Full walkthrough in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/identity-access-management/authenticate/oauth2"},"children":["OAuth2 access tokens"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rotate-an-access-key","__idx":3},"children":["Rotate an access key"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Rotate keys on a schedule, and immediately if a secret may have leaked. To rotate without downtime:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a second access key in the same project."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Deploy the new Key ID / Key Secret to your applications."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify traffic is authenticating with the new key."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Delete the old key from the dashboard."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deleting a key stops new tokens from being issued for it. An access token that was already issued may remain authenticated for a short period after the key is deleted, but it is no longer authorized to access the resource. As a result, requests using that token may receive 403 Forbidden rather than 401 Unauthorized. Revocation may therefore not take effect instantaneously."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"danger","name":"Don't lock yourself out!"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It is possible to delete the very key your own application is using. If you delete a project's in-use key, you'll need to create a replacement in the dashboard before you can authenticate again. Always create the new key before deleting the old one."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"manage-keys-programmatically","__idx":4},"children":["Manage keys programmatically"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also create, list, and delete access keys with the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/accesskeys/"},"children":["Access Keys Management API"]}," instead of the dashboard. In order to call the endpoint your first key must be created in the dashboard, and then used to create subsequent keys:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"curl https://account.api.sinch.com/v1/projects/YOUR_project_id/accessKeys \\\n  -X POST \\\n  -H \"Authorization: Bearer YOUR_access_token\"\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Placeholder"},"children":["Placeholder"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YOUR_project_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/identity-access-management/organize/accounts-and-projects"},"children":["project"]}," the new key should belong to."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YOUR_access_token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A bearer token from an existing key in that project (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/identity-access-management/authenticate/oauth2"},"children":["OAuth2 access tokens"]},")."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response returns the new accessKeyId and secret. As in the dashboard, the secret is shown only this once."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"store-secrets-safely","__idx":5},"children":["Store secrets safely"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Never commit a Key Secret to source control or ship it in client-side or mobile code. These credentials belong on your backend only."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Inject secrets through environment variables or a secrets manager (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, etc.)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a separate key per project and per environment so you can revoke one without affecting the others."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Apply least privilege: create keys in the narrowest project that needs them."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-step","__idx":6},"children":["Next step"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/identity-access-management/authenticate/oauth2"},"children":["Exchange your access key for an OAuth2 access token"]},"."]}]},"headings":[{"value":"Access keys","id":"access-keys","depth":1},{"value":"Create an access key","id":"create-an-access-key","depth":2},{"value":"Use an access key","id":"use-an-access-key","depth":2},{"value":"Rotate an access key","id":"rotate-an-access-key","depth":2},{"value":"Manage keys programmatically","id":"manage-keys-programmatically","depth":2},{"value":"Store secrets safely","id":"store-secrets-safely","depth":2},{"value":"Next step","id":"next-step","depth":2}],"frontmatter":{"seo":{"title":"Access keys | Sinch","description":"Learn about how to create and use access keys."}},"lastModified":"2026-08-12T20:46:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/identity-access-management/access/access-keys","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}