Question: What are the two things you need to pass along to the axios .get method?
- The body object and the data format
- The API endpoint URL and the body object
- The headers object and the data format
- The API endpoint URL and the headers object
Explanation
A GET request needs the resource location and a configuration object that carries request metadata. In Amazon Ads integrations, the request must include valid authorization information so the API can verify access. The headers commonly carry an access token and other required request values. A GET request does not send a request body for standard data retrieval. This structure allows the Amazon Ads API to return authorized resource data securely.
Why the other options are incorrect
Body object This is incorrect because GET requests typically retrieve data without sending a request body.
API endpoint URL and body object This is incorrect because the body object is not the required second value for a GET request.
Headers object and data format This is incorrect because the request still needs the endpoint URL to identify the target resource.
Source for verification
https://advertising.amazon.com/API/docs/en-us/reference/api-overview
https://advertising.amazon.com/API/docs/en-us/guides/account-management/authorization/access-tokens
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.
