yelp error :MISSING_PARAMETER - oauth

I am new to yelp API. I am using version2. I did sign up for API access and got, Consumer Key,Consumer secret, token, token_secret, then I used to the following link
http://api.yelp.com/v2/search?http://api.yelp.com/v2/search?term=food&location=San%2BFrancisco&oauth_consumer_key=SOMEKEY&oauth_consumer_secret=SOMESECRET&oauth_token=SOMETOKEN&oauth_token_secret=SOMESECRET
to get the data but then I get a series of MISSING_PARAMETER errors. For signature_method I used HMAC-SHA1 but for the rest (oauth_signature, oauth_nonce, oauth_timestamp) I iddn't know what to put, so i used an empty field but then I got "INVALID CREDENTIAL" error. How do I get these missing fields?
They are not in my API access page.

First of all you can't publish your keys like that, you need to run a script to "encrypt" them and once you "send" those keys you handshake with yelp and than make a query for the search you are trying to get results for.
Basically you need a script in your preferred language (PHP for example) to make the query. a good start might be https://github.com/Yelp/yelp-api/tree/master/v2

Related

Rest Debugger: Cannot convert access token to JSON

I have this webservice with OAuth2 authentication. I need to create a client for it in Delphi, so I'm using the "Rest Debugger", a tool from Embarcadero that helps configuring rest clients.
Problem is, I get the Bearer token from my webservice by other means, I add it in the headers (picture below), but the application returns "Cannot convert access token to JSON".
I know the token is valid, as I'm able to use it in other clients or tools (Postman, Swagger), it's just the "Rest Debugger" that gets this error from the server.
I would like to know what I'm doing wrong, or if there's some known issue with this specific tool. I've found some clues that suggests that by default it does some kind of encoding in the headers, but I would like to know for sure from someone more familiar with that tool.
Any help would be much appreciated.
In "REST Debugger" you must check "Do not encode" option when adding the Authorization header.

Getting 'unauthorized_client' with Power Platform Custom Connector using OAuth2

I am trying to build a Custom Connector in the Power Platform to connect to the BMC Helix (formerly Remedy) system to create work orders and such. I am using OAuth2 and was given a callback URL, auth URL, token URL, client ID and client secret.
I went to create a connector from scratch. I populated the fields, but I wasn't sure what to put for the 'Refresh URL', so I used the token URL there too.
I am trying to accomplish testing this connector and my successful test would be to get a JWT from doing a POST to the /api/jwt/login endpoint of BMC Helix. It should return a JWT which I can use to make subsequent calls.
Upon testing this, I go to create a connection, but a window opens (which I believe should be a prompt for authentication), but instead it contains an error saying 'unauthorized_client' coming back from the BMC Helix system at the /rsso/oauth2/authorize endpoint. It also contains a property within the URL of redirect_uri = https://global.consent.azure-apim.net/redirect.
Is there something on the Helix side I need to further configure? Not sure why I am getting this....
It sounds like you need TWO METHODS in your connector. A POST to call the token server, a GET (or another POST) to call the API (using the token received from Call 1).
One approach I've successfully used in the past is:
Use Postman to get your token server call working with OAUTH
Then use Postman to get your subsequent API calls working with the token appended
Save both requests to a single Postman collection
Export the Postman collection (as a V1 (deprecated) if I recall correctly)
Import this collection into PowerApps Custom Connector (create new/import from Postman Collection)
You'll have to massage it a bit after import, but it will give you a good headstart and you're starting from a known-good place (working Postman calls)
Good luck!

Trying to get detailed data dumps from new google nest e thermostat

I bought a nest thermostat as I thought it would be able to give me detailed data to showing the target temp and the actual as well as time etc. I needed this for various reasons.
However, it seems the official API "Works with Nest" was closed by Google. I've been able to get postman to ping the same location that the Google Nest Webapp hits and get back the data I need. I want to create a simple webapp to keep polling and save the data locally. However, I'm unable to find the OAuth Client Secret that the Nest Webapp uses to get the authorization code. I had to login via the webapp to get the code in one of the request and then test it out using postman.
Is there any other API that will allow my to poll this data for my Nest easier?
If there isn't another API, is there a way to get the Client ID and Client Secret form the Nest Webapp so I can drop that in mine to use? (I know its hacky, but am I think I'm out of options)

How can I set the authentication in my app in Zapier?

I'm trying to developer an app on the Zapier Developer Platform and I have troubles in authentication.
I have only an Auth Field: Api Key. I have a Test Trigger called 'test_api_key' with a Polling Url and no Trigger Fields. I followed this example: https://zapier.com/developer/documentation/v2/api-key-action/
When I test the authorization in the section 'Connected Accounts'. I have only 'Success' results. Instead, I would like to get a bad result if the Api Key is wrong. When I call my polling url I get a xml in the response that tells me if the Api Key is wrong or is correct.
Maybe I have to create a 'test_api_key_post_poll' method that reads the xml and return a good or a bad result?
If you want it "automatic" - your server should return a non-200 status code if your API Key is bad. For example - 401.
Or, you'll need to add a *_post_poll method in your Scripting to throw an error if the JSON/XML says "Bad authentication" or similar.

Twitter api request

I have read the documentation of twitter , and created an app and have all the keys needed .
Now i am trying to understand that simple one line http request ,to get a user latest twits .
I have read this Simplest PHP example for retrieving user_timeline with Twitter API version 1.1
but there is not one line code in there to make the request ( i don't know java script).
so , i have this :
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2
Which will not work because my keys should be in this line, but i don't understand how to add them?? where and how i add my keys to this ?
This url is like a node or address so twitter server knows what kind of request you need.
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2
Beside url you can pass many other parameter using http header, which is best to be used with server langunge programming, e.g PHP.
In PHP you can pass your credentials by changing header. While current twitter API are using Oauth, it's going to difficult to learn using Oauth this way, the easiest option is to use others' library. Check out 'twitter API library' (just google it)

Resources