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 trialTony Brackins
28,766 PointsCurl 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
Nate Ranson
1,622 PointsHey 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
28,766 PointsHey 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
28,766 PointsI got it. Looks like it was an issue w/ copy/paste formatting
Tony Brackins
28,766 PointsI got it. Looks like it was an issue w/ copy/paste formatting
Tony Brackins
28,766 PointsTony Brackins
28,766 PointsOk awesome thx, will give this a try!