Streaming API - token authorization | Community
Skip to main content
Michael_Soprano
Level 10
March 19, 2026
Solved

Streaming API - token authorization

  • March 19, 2026
  • 1 reply
  • 23 views

If I check the box that I want to use authetication in the Streaming API then what is the best practice:

  1. generate token every time
  2. replace token manually (it expires ex. 90 days?)
Best answer by AmitVishwakarma

Hi ​@Michael_Soprano 

When you enable authentication on an Adobe Experience Platform Streaming (HTTP API) connection, the expected pattern is:

  • Use OAuth Server‑to‑Server (client credentials) from Adobe Developer Console to get an IMS access token (Authorization: Bearer {ACCESS_TOKEN}) for your streaming client.https://experienceleague.adobe.com/en/docs/experience-platform/landing/platform-apis/api-authentication
  • That access token expires every ~24 hours and the lifetime is not configurable per project/connection. You should:
    • Generate the token programmatically from your service using client_id + client_secret + scopes.
    • Cache and reuse the token for all streaming requests until it's close to expiry or you receive a 401 "token expired" and then refresh it automatically, not manually.
  • Do not:
    • Generate a brand‑new token for every event (wasteful and slow).
    • Rely on a single token for "90 days" and update it by hand — that's not how IMS access tokens work.

automate token generation and rotation in your producer service, reuse each token for its 24‑hour lifetime, and refresh it automatically, while always sending Authorization: Bearer {ACCESS_TOKEN} on the authenticated streaming endpoint. https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/streaming/overview https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/tutorials/create-authenticated-streaming-connection

1 reply

AmitVishwakarma
Community Advisor
AmitVishwakarmaCommunity AdvisorAccepted solution
Community Advisor
March 20, 2026

Hi ​@Michael_Soprano 

When you enable authentication on an Adobe Experience Platform Streaming (HTTP API) connection, the expected pattern is:

  • Use OAuth Server‑to‑Server (client credentials) from Adobe Developer Console to get an IMS access token (Authorization: Bearer {ACCESS_TOKEN}) for your streaming client.https://experienceleague.adobe.com/en/docs/experience-platform/landing/platform-apis/api-authentication
  • That access token expires every ~24 hours and the lifetime is not configurable per project/connection. You should:
    • Generate the token programmatically from your service using client_id + client_secret + scopes.
    • Cache and reuse the token for all streaming requests until it's close to expiry or you receive a 401 "token expired" and then refresh it automatically, not manually.
  • Do not:
    • Generate a brand‑new token for every event (wasteful and slow).
    • Rely on a single token for "90 days" and update it by hand — that's not how IMS access tokens work.

automate token generation and rotation in your producer service, reuse each token for its 24‑hour lifetime, and refresh it automatically, while always sending Authorization: Bearer {ACCESS_TOKEN} on the authenticated streaming endpoint. https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/streaming/overview https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/tutorials/create-authenticated-streaming-connection

Amit Vishwakarma - Adobe Commerce Champion 2025 | 16x Adobe certified | 4x Adobe SME