Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools MailChimp API MailChimp API Retrieving List Data

Tony Brackins
Tony Brackins
28,674 Points

Curl Json

Hmm. Curl command didn't work for me (OSX)

curl https://us6.api.mailchimp.com/3.0/lists | json -bash: json: command not found

2 Answers

Hey Tony --

Sorry about any confusion that caused. That "json" command was just an alias I set up to make the results look a little nicer for the videos. If you leave that part out, it should work correctly. However, if you want to organize the response in a more human-readable format, you can use "python -m json.tool" instead of just the "json" command.

Tony Brackins
Tony Brackins
28,674 Points

Ok awesome thx, will give this a try!

Tony Brackins
Tony Brackins
28,674 Points

Hey Nate Ranson , Still getting an error: Tonys-MacBook-Pro:~ tonybrackins$ curl -H “Authorization: apikey APIKEY” https://us6.api.mailchimp.com/3.0/lists curl: (6) Could not resolve host: apikey curl: (6) Could not resolve host: APIKEY” {"type":"http://kb.mailchimp.com/api/error-docs/401-api-key-missing","title":"API Key Missing","status":401,"detail":"Your request did not include an API key.","instance":"APIKEY"}Tonys-MacBook-Pro:~ tonybrackins$

Tony Brackins
Tony Brackins
28,674 Points

I got it. Looks like it was an issue w/ copy/paste formatting

Tony Brackins
Tony Brackins
28,674 Points

I got it. Looks like it was an issue w/ copy/paste formatting