The Call Detail Records API documentation contains an error in the curl example that could cause confusion and failed API calls.
Location
Page: https://developer.8x8.com/analytics/reference/call-detail-records
File: docs/analytics/reference/call-detail-records.api.mdx
The Issue
The curl example shows:
curl -L 'https://api.8x8.com/analytics/work/v2/call-records' \
-H 'Accept: application/json' \
-H '8x8-apikey: <8x8-apikey>' \
-H 'Authorization: Bearer <8x8-apikey>'
The Authorization header incorrectly references <8x8-apikey>. This should be <access_token> - the bearer token returned from the /v1/oauth/token endpoint.
Expected
curl -L 'https://api.8x8.com/analytics/work/v2/call-records' \
-H 'Accept: application/json' \
-H '8x8-apikey: <8x8-apikey>' \
-H 'Authorization: Bearer <access_token>'
Additional Context
Other documentation pages e.g.,https://developer.8x8.com/analytics/docs/work-analytics-company-summary/ correctly show the two-step flow:
- POST to
/oauth/token with 8x8-apikey header + username/password to obtain access_token
- Use that
access_token in the Authorization: Bearer header for subsequent requests
The Call Detail Records API documentation contains an error in the curl example that could cause confusion and failed API calls.
Location
Page: https://developer.8x8.com/analytics/reference/call-detail-records
File: docs/analytics/reference/call-detail-records.api.mdx
The Issue
The curl example shows:
The
Authorizationheader incorrectly references<8x8-apikey>. This should be<access_token>- the bearer token returned from the/v1/oauth/tokenendpoint.Expected
Additional Context
Other documentation pages e.g.,https://developer.8x8.com/analytics/docs/work-analytics-company-summary/ correctly show the two-step flow:
/oauth/tokenwith8x8-apikeyheader + username/password to obtainaccess_tokenaccess_tokenin theAuthorization: Bearerheader for subsequent requests