Closed rickduarte closed 10 years ago
@rickduarte probably you need to UrlEncode your API url first.
@Ponf I tried, but still got error. await client.GetAsync(Uri.EscapeUriString("http://api.yelp.com/v2/business/vapiano-ribeirão-preto"));
Yelp uses OAuth 1.0a. Do I need to set any other information?
@rickduarte I think you need WebUtility.UrlEncode(string) method instead of EscapeUriString
I'm trying to use the library with Yelp API v2 but I'm only getting a BAD REQUEST as response.
var handler = new OAuthMessageHandler("consumerKey", "consumerSecret", new AccessToken("accessToken", "accessTokenSecret")); var client = new HttpClient(handler); var json = await client.GetAsync("http://api.yelp.com/v2/business/vapiano-ribeirão-preto"); return await json.Content.ReadAsStringAsync();
I found something strange. When I do the request using POSTMAN, the oauth_nouce generated is small than generated from the library:
POSTMAN: oauth_nonce=sZWDGE AsyncOAuth: oauth_nonce="674817390"