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
Peter Elisen
7,432 PointsProblems (statuscode 401) creating a new user on Xparse when running the Ribbit app
Problems (statuscode 401) creating a new user on Xparse when running the Ribbit app
I registered on XPARSE and successfully created test data in the previous steps with the Ribbit app but when creating a user i got the following error :
Domain=com.parse.networking.error Code=-1011 "Expected status code in (200-299), got 401" UserInfo=0x9abc660 {NSErrorFailingURLKey=https://api.parse.com/2/user_signup, NSLocalizedDescription=Expected status code in (200-299), got 401}
I am using the downloaded code from treehouse which uses :
[newUser signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error)
I also tried "hardcoding" the input fields as shown in the XPARSE doc instead of the input variables but still got the same error.
newUser.username = @"my name";
newUser.password = @"my pass";
newUser.email = @"email@example.com";
[newUser signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (error) {
-> ERROR Message
1 Answer
Peter Elisen
7,432 PointsI think i figured out the problem.
Cause : ApplicationID and Client key not provided anymore after downloading project code from treehouse
I have the habit of messing around with the code in the project i am working on. Also useful when doing the code challenges because xcode is syntax checking. After messing around i redownload the code from treehouse again. But when accessing PARSE.COM you need to provide a ApplicationID and client key in the AppDelegate.m code which is unique for your app and userid on PARSE. In the video it is shown how to manually insert in the code. But after downloading the project code again this has disappeared. Will create this code again and try again