coblogin failing with error "The cache CobrandCache32610008380 is not initialized." - yodlee

I am Following HTTP POST for coblogin API yields a "The cache CobrandCache32610008380 is not initialized."
error.
curl --data "cobrandLogin=xxx&cobrandPassword=fff" <base url /authenticate/coblogin>
any ideas ?

This turned out to be a Yl. issue. They fixed it.

Related

NiFi- how to http post a PDF document

I wanted to use NiFi's posthttp/invokeHttp processor to post a PDF to an API.
But considering the following cURL request to replicate in NiFi:
curl -X POST "http://ipaddress:port/api/" -H "accept: application/json" -H
"Content-Type: multipart/form-data" -F "pdf_file=#sample.pdf;
type=application/pdf"
Which property takes the -F information in nifi attributes?
Configuration for invokehttp right now:
error:
"400 Bad Request: The browser (or proxy) sent a request that this server could not understand."
Configration for posthttp right now:
error:
server logs: readv() failed (104: Connection reset by peer) while reading upstream
In older version of nifi you will have to use your own script to build a multipart request and then use invoke to create post request. You can refer to this post for a ExecuteGroovyScript example.
https://stackoverflow.com/a/57204862
Since Nifi 1.12 you can directly use invokeHTTP by setting content-type
https://stackoverflow.com/a/69284300
When you use PostHttp/InvokeHttp you wouldn't be referencing an external file, you would be sending the content of the flow file. So you would first need to bring sample.pdf into NiFi by using GetFile or ListFile/FetchFile and then flow file coming out of those processors represents the PDF, and you would route that flow file to InvokeHttp which would POST the content of the flow file (the pdf).

mailjet rest api /send doesn't work

I tried this example in the console from the https://dev.mailjet.com/ :
curl -s -X POST --user "user:pass" https://api.mailjet.com/v3/REST/send -H 'Content-Type: application/json'
and the result is always
{ "ErrorInfo" : "", "ErrorMessage" : "Unknown resource: \"send\"",
"StatusCode" : 400 }
If I try other get requests, like /contact the result is with success.
Please help
The URL you're using is not the right one. Please change it to https://api.mailjet.com/v3/send.
Please visit the dedicated API guide for our transactional API here https://dev.mailjet.com/guides/#send-transactional-email
Hope it helps.
hAPI coding with Mailjet API!

Pushbullet API from cURL - invalid request

I'm working on an app using Pushbullet's API, but I'm running into odd errors when running through the sample code at https://docs.pushbullet.com/v2/pushes/.
I'm executing the following cURL command (in Windows):
curl -k -u <MY_API_KEY>: -X POST https://api.pushbullet.com/v2/pushes --header 'Content-Type: application/json' --data-binary '{"type": "note", "title": "Note Title", "body": "Note Body"}'
...but it keeps generating the following error:
{"error": {"type":"invalid_request","message":"The param 'type' has an invalid value.","param":"type","cat":"\u003e:3"}}
It also produces this error:
The other commands for the other endpoints in the documentation work fine...it's just this one.
Got any suggestions? Thanks for the help! :)
It looks like windows doesn't support those kinds of quotes on the command line. Here's an example that works:
curl https://api.pushbullet.com/v2/pushes -X POST -u <access token>: --header "Content-Type: application/json" --data-binary "{\"type\": \"note\", \"title\":\"Note Title\", \"body\": \"Note Body\"}"
I think I'm going to try to replace the curl examples with something that has less confusing behavior.
I figured it out - I don't really know why, but the cURL command wasn't working through the DOS prompt, and also wasn't working using the Postman REST client for Chrome, but I got it working in the DHC extension for Chrome. The trick was setting the Authorization header to "Basic", which resolves the Pushbullet access token to some other form, and makes a successful the HTTP request.
Hope this helps someone down the road if they run into this on Windows!

Youtube oEmbed API: 302, then 503 errors

I'm using drupal 7 with the Media Youtube module. The module calls the youtube oEmbed API.
This is an example of url the module will call:
http://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=YZqqD1Rv5BI
On my desktop, this returns a json file, all fine.
However on my website's server, I get a 503 Service unavailable error.
Actually I frst get a 302 not found, saying the url has moved, then a 503 error:
Here is what I get when I do a wget manually:
wget http://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=YZqqD1Rv5BI
--2014-09-28 21:55:49-- http://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=YZqqD1Rv5BI
Resolving www.youtube.com (www.youtube.com)... 2a00:1450:4007:808::1004, 173.194.40.131, 173.194.40.132, ...
Connecting to www.youtube.com (www.youtube.com)|2a00:1450:4007:808::1004|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ipv6.google.com/sorry/IndexRedirect?continue=http://www.youtube.com/oembed%3Furl%3Dhttps://www.youtube.com/watch%3Fv%3DYZqqD1Rv5BI [following]
--2014-09-28 21:55:49-- http://ipv6.google.com/sorry/IndexRedirect?continue=http://www.youtube.com/oembed%3Furl%3Dhttps://www.youtube.com/watch%3Fv%3DYZqqD1Rv5BI
Resolving ipv6.google.com (ipv6.google.com)... 2a00:1450:4007:808::1008
Connecting to ipv6.google.com (ipv6.google.com)|2a00:1450:4007:808::1008|:80... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
2014-09-28 21:55:49 ERROR 503: Service Unavailable.
Any help would be much much appreciated.
Thanks in advance
I met the same error, but the issue is not with the module, unfortunately (I would be able to fix it and commit a patch for the module mantainer).
As you already tested, even a simple wget gives the same issue and it comes from the fact that it uses IPv6. If you can force requests to youtube to be handled through IPv4 the problem will be solved. But this is just a work-around, not a real fix.
I found a way to force IPv4 DNS resolving in PHP:
$url = 'http://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZVSd5aSXlQ0';
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$json = curl_exec($c);
$status = curl_getinfo($c,CURLINFO_HTTP_CODE);
curl_close($c);
This solution is actually working for me.

Google Cloud Messaging 3rd party server gets "Missing Registration" error on sending message

I'm trying to send a message from 3rd-party server. When I send http request using curl command on shell, it works, but when I do the same thing with Ruby script, I keep on getting "Missing Registration" error. More specifically, when I type
curl --header "Authorization: key=MY_KEY" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"MY_REGISTRATION_KEY\"], \"data\":{\"data1\":\"data1val\"}}"
I get the following response
{"multicast_id":5609541310450656515,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1346184864739450%3083a1e3f9fd7ecd"}]}
, and the message is correctly received by Android device.
However, if I use the following script, the response from GCM server send error message like "Error=MissingRegistration". (using ruby version 1.9.3)
require "net/https"
require "uri"
uri = URI.parse("https://android.googleapis.com/gcm/send")
https = Net::HTTP.new(uri.host, 443)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
https.start{|https|
request = Net::HTTP::Post.new(uri.path)
request["Authorization"] = "key=MY_KEY"
request["Content-Type"] = "application/json"
request.set_form_data({:registration_ids => ["MY_REGISTRATION_KEY"],
:data => {data1:"data1_val"}
})
response = https.request(request)
p response.body
p response.header
}
I'm feeling like there is some problem around char encoding. I defined charset in content-type header and tried, but the result was same.
Can anyone help me?
It's about encoding. You have to set request's encoding to UTF8.