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 9141445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:38:44+00:00 2026-06-17T09:38:44+00:00

I am trying to do a yelp query and using OAuth Lib Here is

  • 0

I am trying to do a yelp query and using OAuth Lib

Here is the code

  NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"http://api.yelp.com/v2/search?term=petrol+restaurants&ll=%f,%f&radius_filter=300",coordinate.latitude,coordinate.longitude]];

  OAConsumer *consumer = [[OAConsumer alloc] initWithKey:consumerKey secret:consumerSecret];
  OAToken *token = [[OAToken alloc] initWithKey:tokenUrl secret:tokenSecret];

  id<OASignatureProviding, NSObject> provider = [[OAHMAC_SHA1SignatureProvider alloc] init];
  NSString *realm = nil;

  OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:URL
                                                                 consumer:consumer
                                                                    token:token
                                                                    realm:realm
                                                        signatureProvider:provider];
  [request prepare];

  NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
  connection = nil;

The code works perfect if the query has one term , term=petrol e.g But if I add two terms like term=petrol+fuel it starts giving me error {"error": {"text": "Signature was invalid", "id": "INVALID_SIGNATURE", "description": "Invalid signature

What is wrong with this code?

SAMPLE API REQUEST

http://api.yelp.com/v2/search?term=cream+puffs&location=San+Francisco

iTS Contains a + but when i use + it gives me above error

  • 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-17T09:38:45+00:00Added an answer on June 17, 2026 at 9:38 am

    I encoded the String with UTF8 Encoding and now working well

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

Sidebar

Related Questions

I am trying to use Google Apps Script to query the Yelp Search Api
I'm trying to use the Yelp API to get local restaurants depending on the
I'm trying to use the CombineFileInputFormat class using Yelp's MrJob tool for EMR. The
Trying to call from an android client, using the signpost oauth libs. I generated
I am trying to set up my first ever API connection with Yelp, I
Problem I am trying to display the reviews of a Restaurant using Yelps API
I'm trying to learn to use Yelp's Python API for MapReduce, MRJob. Their simple
Trying to copy the msdn refernce here doesn't work and gives an error I
I'm trying to make an augmented reality application with a waypoint structure, like Yelp,
Trying to understand isolation levels better - using entity framework and sql server What

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.