Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7876047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:06:21+00:00 2026-06-03T03:06:21+00:00

I have to access Rest api in iOS and i am using RestKit for

  • 0

I have to access Rest api in iOS and i am using RestKit for that. The server only accept POST request and send response in JSON. Just help me to call the login api using RestKit. The url is like:

http://mobile.domian.co/apiversion/user/login

and Post parametersare:

app_key(string),signature(string),timestamp(dateTime),user_id(string),password(string).

available response representations

{
"status": "0",
"result": {
    "error_code": "1",
    "error_msg": "Login failed. Wrong username or password"
}

{
“status”: “1”,
“result”: {
“data”: {
“avatar”: “”,
“email”: “sd.p@clozette.co”,
“user_name”: “sd”,
“newsletter”: “1”,
“bio_data”: “About myself”,
“mth_dob”: “1”,
“yr_dob”: “1981”,
“hometown”: “”,
“dob_priv”: “1”,
“hometown_priv”: “1”,
“bio_data_priv”: “1”,
“block_comment_notification”:”0”,
“block_liked_notification”:”0”,
}

Please help me. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:06:22+00:00Added an answer on June 3, 2026 at 3:06 am

    Here is the Answer(you should convert your datetime to string) :-

            NSString *post =[NSString stringWithFormat:@"app_key=%@&signature=%@&timestamp=%@&user_id=%@&password=%@",appKEY,Signature,Datetime,UID,Password];
    
        NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
    
        NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
    
        NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
        [request setURL:[NSURL URLWithString:@"Your URL"]];
        [request setHTTPMethod:@"POST"];
        [request setValue:postLength forHTTPHeaderField:@"Content-Length"];
        [request setValue:@"application/x-www-form-urlencoded charset=utf-8" forHTTPHeaderField:@"Content-Type"];
        [request setHTTPBody:postData];
    
        NSError *error;
        NSURLResponse *response;
        NSData *returnData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
        if (error)
    {
        NSLog(@"Error is %@",[error localizedDescription]);
    }
    
        returnString=[[NSString alloc]initWithData:returnData encoding:NSUTF8StringEncoding];
        if(!returnString)
        {
            UIAlertView *erroralert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"There is an error getting response" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
            [erroralert show];
            [erroralert release];
        }
        else 
        {
            NSLog(@"%@",returnString);
        }
        SBJSON *json = [[SBJSON new] autorelease];
        NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithDictionary:[json objectWithString:returnString error:nil]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have REST API that we want only our domain has access to and
I have a REST API that I am trying to access using Rails 3.0.1
I have access to an Oracle server that has some databases that I would
I access a REST api service that utilizes a variable called session_id. The API
I am using salesforce rest api to access the salesforce account from my rails
I have been using HTTPClient version 4.1.2 to try to access a REST over
I have a server managed by Chef. I need to access some values that
We have a website that we want to provide web based API access to
I'm trying to post a Facebook status update, using the Facebook iOS API, with
I have a bugzilla server which i am trying to access through the rest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.