Assistance required to connect to Foursquare via TIBCO BW using REST / JSON API - 1.1 - json

We have an assignment to check the compatibility of Quick connect project for Foursquare against the REST/JSON 1.1.
When I am testing the process, while invoking Rest API for query Check-in, the process is throwing an error – “OAuth token invalid or revoked”. Can you kindly help to fix this issue.
Access_token for this was generated by registering a sample app with Foursuare.com, having www.google.com as welcome page and redirect URL. Please let me know if this is causing the issue.
Also, let me know is there is any standard method to generate the access_token for this.
Thanks in advance.
Regards,
Shree.

It sounds like you're not following Foursquare's instructions on connecting properly, or need to reconnect to get a new access_token. Keep in mind that the access_token isn't the code that comes back in the redirect, the code needs to be used to exchange for the access_token.

Related

iTunes Store Customer Reviews API XML Endpoint Broken

I used to use the XML endpoint because it provided review dates for each review called 'updated'. This is not contained in the JSON endpoint. However, the XML endpoint stopped working. I get the error seen below:
Web Server Error
Description: The host did not return the document correctly.
Has anyone experienced the same issue? Any workarounds? Do you anticipate this will ever be fixed by Apple? Do you think the JSON endpoint might be taken down any time soon?
XML Endpoint (Broken)
https://itunes.apple.com/us/rss/customerreviews/id=1145275343/mostrecent/xml
JSON Endpoint (Working)
https://itunes.apple.com/us/rss/customerreviews/id=1145275343/mostrecent/json
It appears the XML endpoint is up and running again. No more Web Server Error. Hopefully the endpoint stays up.

About Twitter's REST API 1.1 Bad Authentication data Code : 215

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=20.9533951,75.9364752&radius=500&types=food&key=put_your_key_here
This is the URL of google maps api. Which returns json data if we pass the key at the last. and hit that url from our browser directly.
So is there anything like that in twitter as well? By which we can pass our consumer key or something like that at the end of link like this https://api.twitter.com/1.1/trends/available.json
Because without any tokens if we hit this URL then its giving error : Bad Authentication data Code : 215
Please help me. i am finding this from very long and have no luck.
Please Thank You So Much.
The short answer is no.
The long answer is that all requests to the Twitter REST API need to be authenticated using OAUTH. You need to follow the OAUTH process and use the tokens as described starting here.
&oauth_consumer_key= your consumer key
&oauth_nonce=nonce
&oauth_signature_method=HMACSHA1
&oauth_timestamp=1505894968
&oauth_token=token
&oauth_version=1.0
&oauth_signature=signature
You have to send these header with your request then it will work fine

WooCommerce api authentication error oauth_consumer_key parameter is missing

I try to fetch all product data list in json from WooCommerce API and type address bar http://www.batata.in/wc-api/v3/orders. But it give an error:
{"errors"[{"code":"woocommerce_api_authentication_error","message":"oauth_consumer_key parameter is missing"}]}
I tried all things but issue is not fixed. Rest API is on.
If anybody know any other way to find product list in json format from WooCommerce WordPress plugins, then please tell me.
I have faced the same problem. After some research, I have solved this issue. Kindly check that your site secure or not [http or https]. I missed the "s" for http.
Please note that you need to provide consumer key, nonce, signature with your rest api call. Following is the format which worked for me.
http://SomeURL.com/wc-api/v2/orders?oauth_consumer_key=########&oauth_timestamp=######&oauth_nonce=#############&oauth_signature_method=HMAC-SHA256&oauth_signature=##########################
For generating nonce and signature I recommend you use some wrapper available for your platform. I used php so got a nice library here.
https://github.com/woocommerce/wc-api-php
Important:- Even after following all above steps correct I got the same issue you faced. It kept giving me error "oauth_consumer_key parameter is missing" which actually was misleading. The issue I figured out was the basic http auth. I had http authentication in place so the curl request I used to fire was returning 401 unauthorized. If you are using php you will understand following line.
curl_setopt($this->ch, CURLOPT_USERPWD, "USERNAME:PASSWORD");
And it worked. So point here is you can try this or play around with your curl/socket or any client you are building and don't focus on the error message as it is misleading most of the time.
Sandipa Mukherjee's answer is right.
For http:// additional oauth parameters are required, because it's not safe.
My suggestion is to use the https:// server for wordpress.
Please refer to https://scriptstown.com/how-to-setup-cloudflare-ssl-and-configure-origin-certificate-for-apache/

implementing REST sdk for custom platform

I am implementing paypal REST integration for a new platform
I got stuck and would apprecıate any help
The interesting problem I get is the REST request I copied from the documentation page gives error. https://developer.paypal.com/docs/rest/api/payments/
I am not using command line but a little windows app to send web requests.
I just used exact same payload and got this error
The remote server returned an error: (503) Server Unavailable.
{"name":"INTERNAL_SERVICE_ERROR","information_link":"https://api.sandbox.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"c4a8716d8a791"}
The C# sample from the github works and when I use th json it generated everything works ok.
I found out that if I change the cardnumber the sample works. Will let paypal team now.

How to set ServerCredential in Backgrounduploader in WinJS app

I called attached code below in WinJS app and keep getting this error 405 Method Not Allowed. I have changed the method property to "POST" , still the same thing. Some of the guys saying it is to do with the permission so I am trying to set the credential in the uploader. This is an internal app so we assume this should carry the Windows Authentication. But at the moment, I could not find how. Can anybody help?
uploader.createUpload(endpoint, file)
.startAsync()
You haven't narrowed down the problem to the point where you should be worrying about how to express what you need with BackgroundTransfer APIs yet - you need to figure out what you need to express, first.
If you have access to good documentation or a knowledgeable owner of this internal service you're connecting to, your first step should be consulting that to figure out what exactly the HTTP request (and the associated credential headers) should look like.
If you don't have access to that, the second best starting point is to take an existing, working client of this service you're uploading to and use a networking capture software (Fiddler, for example) to take a look at what the request it's sending looks like.
Once you've figured out the specific HTTP method and server credentials you need to use, you can tell BackgroundTransfer to use them by setting the method and serverCredential properties of your uploader object before creating your uploads.