Question: Fill in the blank: const headers = { Authorization: `Bearer ${private_app_token} 'Content-Type: ______ }
- application/json
- application/xml
- multipart/form-data
- application/x-www-form-urlencoded
Explanation
The Content-Type header tells the API how to interpret the request body. For most HubSpot API calls that send JSON data, the request should use a JSON content type. The Authorization header carries the bearer token used to authenticate the private app request. This header setup ensures the API can both verify access and correctly parse the submitted payload. Other content types are only used for specific request formats, not standard JSON API calls.
Why the other options are incorrect
application/xml This is incorrect because HubSpot API request bodies are not typically sent as XML.
multipart/form-data This is used for file or form uploads, not standard JSON API payloads.
application/x-www-form-urlencoded This is used for form-encoded requests, not standard JSON API payloads.
Source for verification
https://developers.hubspot.com/docs/api-reference/intro-to-auth
https://developers.hubspot.com/docs/api-reference/error-handling
The answer(s) to the question is highlighted in the BOLD text above. You can also find more questions and answers related to the exams on the "Integrating With HubSpot I: Foundations" page.
