Hi All,
I seem to always get unstuck with API calls despite reading the documentation. Sometimes I can get them to work other times its just pressing and guessing. I typically just build a single string I pass into the URL field but this time tried just using the headers.
The construct is: $ curl -v -X GET -H "Accept: text/csv" -H "Authorization: Basic <encoded-api-key>" "https://epc.opendatacommunities.org/api/v1/domestic/search?postcode=M1"
I am using the postcode search example found here:
https://epc.opendatacommunities.org/docs/api/domestic
URL parameter is therefore:
https://epc.opendatacommunities.org/api/v1/domestic/search?postcode=M1
In my header I have
Payload
I just get a response of Not Authorised. I'm not quite sure what I have done wrong. any help would be greatly appreciated
Thanks,
Ashley
Hey @50ld13r
Everything looks right. When I am working with APIs and I am in the same situation as you and all the parameters look fine it's almost always the authorization is not correct somehow. Either it's not encoded correctly, it's no longer valid, doesn't have the permissions I expected or something else.
Let us know what you find