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

  • Home
  • SEARCH
  • 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 9204659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:45:45+00:00 2026-06-17T23:45:45+00:00

I have an app that uses a 2 leg oAuth on our PHP server.

  • 0

I have an app that uses a 2 leg oAuth on our PHP server. We parse the php://input stream curently to get the signature params and raw post data. However according to php.net you can’t use input stream with multipart form data so when I try to send an image from the iPhone to server the php://input stream is empty.

Here’s my question being new to Oath rules and what not.

Is it required that you use the input stream vs reading from $POST super global?
Can I send the signature and image in the same call like

    NSString *boundary = @"---------------------------14737809831466499882746641449";
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];


[postData appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", @"signature"] dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[postVars dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]];


[postData appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"uploadedfile\"; filename=\"tester.png\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"Content-Type: application/octet-stream\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[NSData dataWithData:imageData]];
[postData appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];

I’ve seen some suggestions to set the Authorization header with the signature params. Is it correct to send signature in the post body or set the authorization headers? Also Am I way off in how to upload and image using oAuth? Does it need to be 2 calls or can I do signature and image in same calls?

Thanks for the help. We are using this to send data from iPhone to our server so we wrote both sides but want to follow oAuth best practices.

  • 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-17T23:45:46+00:00Added an answer on June 17, 2026 at 11:45 pm

    Oauth prefers the oauth params set in the authorization header (see here). Everything that the provider expects should be in that header, including a signature that’s formed by signing the verb, the url, post parameters, various oauth params, etc., lexically ordered.

    The rest of the request can be whatever you want, like an image post, multipart or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that uses NASA live TV stream for the iphone/ipad which
I have java app that uses Axis to get data from web service. web
I have an app that uses JSoup to connect to a web server, and
I have an app that uses a couple of SOA calls to get some
So, I have an app that uses a SQL Server express db. I have
I have an app that uses the ActionBar with tabs in combination with Fragments.
I have an app that uses webView. In the home screen of a website
I have an app that uses a transition file to flip from page to
I have an app that uses the built-in flip animation to switch between the
I have an app that uses EF. To test my stuff I generally wrap

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.