Hi,
I am facing an issue with Alteryx workflow of API integration with a tool called "Smarty".
I have the documentation, link below
US Street Address API documentation - Smarty
I am using correct auth-id, auth-token and license. But still I am getting this error I have shared in the attached screen shots.
HTTP/1.1 400 Bad Request
Please let me know if something is not right with my approach.
Hey @Manvi2408, the documentation notes to make sure your headers are correct, which you can set in the 'Headers' tab:
Failing that, we can't see the full URL in your screenshot. If the fix above isn't right, are you able to provide an example of this? Perhaps a screenshot or copy and paste, obviously hiding your credentials (but only them, don't cover any other parts). 400 tends to be from a malformed URL is all.
Hello @DataNath
Thanks for your response,
I have already added the correct headers, I am also sharing the url, its in the same format as the smarty documentation.
Please check the attached snapshots.
Hey @Manvi2408, I can check the URL if this isn’t the issue. However, iirc the headers are case-sensitive and so should be ‘Content-Type’ & ‘Host’ rather than ‘content-type’ & ‘host’.
Obviously can't see your credentials, but are there spaces or anything in there that you may need to encode properly?
If you try using the example they provide within the documentation, using your credentials where they have provided a dummy, does it work?
https://us-street.api.smartystreets.com/street-address?
auth-id=YOUR+AUTH-ID+HERE&
auth-token=YOUR+AUTH-TOKEN+HERE&
license=YOUR+LICENSE+HERE&
street=1600+amphitheatre+pkwy&
city=mountain+view&
state=CA&
candidates=10
(Remove line breaks as they're just added to make it more readable. The issue may be that you're just providing credentials and not a query after.
Hi @DataNath
Yes, It works for a single input, like below URL has single address as input. But I want to be able to match multiple addresses, I want to be able to input a csv file, and get the matched addresses from the Smarty database.
https://us-street.api.smartystreets.com/street-address?
auth-id=YOUR+AUTH-ID+HERE&
auth-token=YOUR+AUTH-TOKEN+HERE&
license=YOUR+LICENSE+HERE&
street=1600+amphitheatre+pkwy&
city=mountain+view&
state=CA&
candidates=10
Have you managed to parse the .csv and get a list of all of your addresses? If so, depending on quantity, you could concatenate them and construct a multiple-address request (refer to documentation), or construct the API URL for each using a formula tool and your address fields before running them through your download tool.