Hello everyone!
I am new to API's and React in general so i apologize if I misspeak or did not provide enough info but i am working on a project have a component that maps the contests array and renders the office, Candidate and party data. When using postman to test the GET request for
"
https://www.googleapis.com/civicinfo/v2/voterinfo?address=3117 Kansas Ave, Norfolk, VA 23513&key=My_Key" i get a successful response.
However, when using axios.get to fetch the same URL with the same parameters (api_Key, address) it returns this error message
"error": {
"code": 400,
"message": "Missing required field voter_key",
"errors": [
{
"message": "Missing required field voter_key",
"reason": "invalid"
}
],
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Missing required field voter_key"
}
]
}
]
}
}
I have gone through the documentation. I had ChatGPT go through it and look at the code, we are both stumped by this.
I appreciate it!