Reputation: 167
Got a API_KEY from YELP Rest API, tried to use their curl example and pasted it to command prompt with my key. Didn't work for me, What is the issue?
curl --request GET \
--url 'https://api.yelp.com/v3/businesses/search?location=New%20York%2C%20NY&term=food&sort_by=best_match&limit=20' \
--header 'Authorization: ******' \
--header 'accept: application/json'
Looked up info online, found stuff about adding a BEARER and SSL Issues curl: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate but didn't know how to put it all together.
Upvotes: 0
Views: 51
Reputation: 167
I ended up writing it like this and it worked out!
curl --ssl-no-revoke -X GET -H "Content-Type: application/json" -H "Authorization: Bearer *********" "https://api.yelp.com/v3/businesses/search?location=New%20York%2C%20NY&term=food&sort_by=best_match&limit=20"
Note, maybe it was the "" or not using the short form.If someone could rewrite the above Rest call using the --ssl-no-revoke and Bearer option, that would be great.
Upvotes: 0