Shaun Rodgers
Posts: 0
Joined: Sat Oct 25, 2014 12:41 am

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

Hi,

Does anyone know how to add the Yelp Search API to Appery.io?

I want to add local business search to my App based on specific search terms and list them, nearest first in a list box.

I've created a Service and added all of the parameters such as, oauth_codes etc. but I'm getting errors when I test the service.

Any help from anyone who's managed this would be gratefully accepted!!

thanks

Shaun

Shaun Rodgers
Posts: 0
Joined: Sat Oct 25, 2014 12:41 am

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

After days of trying and reading everything I can find, these are my results so far...

I thought the oauth_signature was generated BY the request not as an input...obviously not by this result!

Input ( see api_test_1.png)

{
"status":400,
"uri":"http://api.yelp.com/v2/search",
"response":{
"error":{
"text":"One or more parameters are missing in request",
"id":"MISSING_PARAMETER",
"field":"oauth_signature"
}
}
}

I don't know what code to add to the oauth_signature parameter, I did read that I needed to concatenate the result of HMAC-SHA1 and the oauth_token_secret key but I don't know how to do that, even if that made sense!

Below I tried to use the oauth_token_secret key on it's own...

Input ( see api_test_2.png)

{
"status":400,
"uri":"http://api.yelp.com/v2/search",
"response":{
"error":{
"text":"Signature was invalid",
"id":"INVALID_SIGNATURE",
"description":"Invalid signature. Expected signature base string: GET&http%3A%2F%2Fapi.yelp.com%2Fv2%2Fsearch&location%3Dlondon%26oauth_consumer_key%3DOXXXXXXXX-JDn2CADA%26oauth_nonce%3DsaXXXXXXXXXhu7%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1485532322%26oauth_token%3DBXXXXXXXXXA6Zezz9gXXXXXXXgJp9Sto%26term%3Dlawyer"
}
}
} Image Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

Hi Shawn,

You can use any 3rd party api via appery services.

We didn't work with this yelp api and can not tell you exactly what is wrong.

But if you have correct response that you can emulate in different features - we can help to build this request in appery service.

Also it's better to ask in Yelp support about what is wrong in your request(what is missing ..)

Regards.

Shaun Rodgers
Posts: 0
Joined: Sat Oct 25, 2014 12:41 am

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

Hi,

I have asked the same question in Yelp Developer Support on Google, but I've had no response yet.

You say you can help me build this request, what information do you need from me to do this?

I know others will also want to use this API Request, so it would be very helpful if a generic request was created by someone who knows what they are doing, unlike me!

thanks

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

Hi Shaun,

As i can see in YELP documentation you should use OAUTH 1.0a to authorize.

See details here: http://www.yelp.com/developers/docume...

So you should pass parameters by headers described there.

Also you can use following library to create correct "oauth_signature" parameter:

https://www.npmjs.org/package/oauth-1.0a

Regards.

Nevin Raj
Posts: 0
Joined: Sun Dec 28, 2014 7:37 am

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

I'm having trouble with this too. How do you error check / test? I can't use the Test feature in the service because the oauth_signature parameter is too complex to hard code.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

Hello Nevin,

Probably the easiest way is to check for the errors in a browser console and use Weinre:
http://devcenter.appery.io/documentat...

Nevin Raj
Posts: 0
Joined: Sun Dec 28, 2014 7:37 am

Yelp Search API, Does It Work As A Service IN Appery.io ??!!

Thanks for the tip but Weinre actually doesn't help much. (It doesn't give me anything more than selecting "Inspect Element" in Chrome.)

Let me rephrase the question as I've narrowed down my issue: I'm trying to figure out how to generate the oauth_signature parameter. I tried looking through the link in an earlier post (https://www.npmjs.org/package/oauth-1.0a). Not sure how to implement this in an Appery service. Do you have any guidance? The documentation in the link doesn't help me understand, for example, the output of the .authorize function, as I would need to pull the signature component and not the full header.

Return to “Issues”