Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

EPC API

50ld13r
7 - Meteor

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

 

Header.JPG

 

Payload

payload.JPG

 

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

 

1 REPLY 1
joshuaburkhow
ACE Emeritus
ACE Emeritus

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

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Labels