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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Hector Romero](https://secure.gravatar.com/avatar/be9bb6431e31974ae809301cce61ba70?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Hector Romero
6,151 PointsRetrieving data from Xively
Hi! I just watched this video and tried to retrieve data from Xively from a JSON like this: http://api.xively.com/v2/feeds/763256681.json and I couldn't. Can somebody help me? Thanks a lot!
1 Answer
![Sam Chaudry](https://secure.gravatar.com/avatar/28ea3385ec92d9eeaf96d0ed82432ed3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sam Chaudry
25,519 PointsHi Hector I just checked out the link? If the data requires access then your app needs to make a call to the server to get permission. You need to be using NSURLAuthenticationChallenge it has methods associated with which will allow your app firstly to get access to the data before parsing it.
Once you have ti then your need to parse in the url with NSURL and use NSJSONSerialization to retrieve the data your interested in.
Without seeing your full code I can't give you to much advice hope this helps!!
Hector Romero
6,151 PointsHector Romero
6,151 PointsThanks, Sam. Here is my code: http://goo.gl/FIQFL4 I've just begun to build iOS apps and I don't really have ability using documentation. How can I implement NSURLAuthenticationChallenge you mentioned? Thanks so much!