diff --git a/src/content/docs/cloudflare-one/identity/service-tokens.mdx b/src/content/docs/cloudflare-one/identity/service-tokens.mdx index 6eae9884229482f..47a5da52f95443c 100644 --- a/src/content/docs/cloudflare-one/identity/service-tokens.mdx +++ b/src/content/docs/cloudflare-one/identity/service-tokens.mdx @@ -5,7 +5,7 @@ sidebar: order: 6 --- -import { AvailableNotifications, Render } from "~/components"; +import { AvailableNotifications, Render, APIRequest } from "~/components"; You can provide automated systems with service tokens to authenticate against your Zero Trust policies. Cloudflare Access will generate service tokens that consist of a Client ID and a Client Secret. Automated systems or applications can then use these values to reach an application protected by Access. @@ -35,6 +35,37 @@ curl -H "CF-Access-Client-Id: " -H "CF-Access-Client-Secret: + +2. Make a `PUT` request with the name of the header you want to use for service token authentication. To avoid overwriting your existing configuration, the `PUT` request body should contain all fields returned by the previous `GET` request. + + + +2. Add the header to any HTTP request. For example, + + ```sh + curl -H "Authorization: {"CF-Access-Client-Id": "", "CF_Access-Client-Secret": ""}" https://app.example.com + ``` + ### Subsequent requests After you have [authenticated to the application](#initial-request) using the service token, add the resulting `CF_Authorization` cookie to the headers of all subsequent requests: