Error Invalid Request - oauth

I tried to create the Google+ O Auth2 API Key inside the google developer console. Everytime i try to add a name and save it i yust got the response.
Fehler
Die Nutzeranfrage ist ungültig. Bitte überprüfen Sie Ihre URL und
versuchen Sie es erneut.
"Error, Your request is invalid. Please check your URL and try again". Does anyone have a idea what there could be wrong? Is it a defect on google or did i something wrong?
http://bild-speichern.de/dn.jpg

Related

How to configure UTF-8 for plain/text Haml template for ActionMailer?

From within my Rails 3.2 app I am sending multipart emails and therefore prepared a template for plain/text emails. This is the template..
app/views/welcome_mailer/welcome_email.text.haml:
Willkommen #{#user.name}!
Du hast dich erfolgreich auf unserer Webseite mit deiner
E-Mail-Adresse #{#user.email} registriert. Damit du dich
dort anmelden kannst, bestätige bitte einmalig deine E-Mail-Adresse
mittels folgendem Link:
#{confirmation_url(#user, confirmation_token: #user.confirmation_token)}
Viel Spass auf der Webseite und einen schönen Tag.
The content of the welcome mail contains German Umlauts. The special characters are not displayed correctly when I inspect the email on the receiver side. How can configure the correct character encoding for the content?
Have you tried sth like the following in your mailer?
mail(charset: "utf-8", content_type: "text/html")

invalid byte sequence in UTF-8 with Rails flash messages

we use Rails 3 and Spree Commerce for our online shop and we have a payment provider, that returns errors in a redirect URL if some occur. When an error occurs, we present that string with flash messages to the user.
Yesterday, something didn't work, and the payment provider returned this string in the redirect URL, which should be presented to the user inside a flash message:
errormsg=Bitte+versuchen+Sie+es+sp%E4ter+nochmals.
I debugged a little bit, and the string looks like this when decoded (e.g. is written to flash[:error]):
Bitte versuchen Sie es sp\xE4ter nochmals.
And after that, an error is raised, when rails tries to render the flash message:
invalid byte sequence in UTF-8
Can someone tell me, how to fix this? The error should contain a german ä and not \xE4. I tried setting # encoding: utf-8 to the beginning of the controller and the view, but this doesn't help.
'Obviously, your payment provider uses ISO-8859-1 or similar to send german umlauts.
As your rails app uses UTF-8, you can convert the message of your provicder.
Assume you stored the message in variable msg, use
utf_msg = params[:errormsg].force_encoding('ISO-8859-1').encode('UTF-8')
you can also check, if the resulting encoding is valid:
uft_msg.valid_encoding?
and outpunt a different message to avoid errors.

Youtube Data API-debugging authentication errors

Getting authentication errors when I try and obtain my upload authorization token
https://developers.google.com/youtube/2.0/developers_guide_protocol_error_responses
Using a packet sniffer, my first error message is>
401 Token invalid - Invalid token: Cannot parse AuthSub token:
In addition to perhaps improperly formatted Auth key value, I'm wondering exactly what headers I should be including for my upload auth request.
I am using the following though think clientId has been deprecated
"Authorization", "GoogleLogin auth=\"" + authToken + "\""
"X-GData-Client", clientId
"X-GData-Key", "key=" + devKey
After changing
"Authorization", "AuthSub token="+authToken
to
Authorization", "GoogleLogin auth="+authToken
in my request I no longer get 'Cannot parse AuthSub token' error message but
I still get
Error #2032: Stream Error. URL: http://gdata.youtube.com/action/GetUploadToken
<errors>
<error>
<domain>yt:authentication</domain>
<code>Unknown</code>
</error>
</errors>
Stumped. Would really appreciate any feedback as I'm not even certain now where my error(s) exist!
ok working but not really sure how:)
Am using these 2 headers in my POST request to
'http://gdata.youtube.com/action/GetUploadToken'
"Authorization", "GoogleLogin auth="+authToken
"X-GData-Key", "key=" + devKey
And also needed to associate my youtube user developer credentials with a channel
https://groups.google.com/forum/#!msg/youtube-api-gdata/76x8vaADJWM/36O05FD7mC0J
A packet sniffer or at least adding support to read the XMl error responses is essential!
I resolved this problem by providing the correct developer key

File not found while giving URI request to get request token in Oauth authorization flow (to access Yahoo API)

I am following oauth authorization flow(http://developer.yahoo.com/oauth/guide/oauth-requesttoken.html) for accessing Yahoo's Contact API . I am able to get consumer key and consumer secret for my application from first step.
However I am getting "File Not Found" in 2nd step while giving URI request.
My URI request is given below===>
https://api.login.yahoo.com/oauth/v2/
get_request_token?oauth_nonce=rs2130523f788f313f76314ed3965ea6
&oauth_timestamp=1325661943
&oauth_consumer_key=dj0yJmk9VndXdnhUbkJMc2MyJmQ9WVdrOVUzcFdkbnA0TXpnbWNHbzlNamMxTXpJeU9UWXkm
cz1jb25zdW1lcnNlY3JldCZ4PTkw
&oauth_signature_method=plaintext
&oauth_signature=1daaeb467916f4331023fc5fce3cb6b6c27ac7ed
&oauth_version=1.0
&xoauth_lang_pref="en-us"
&oauth_callback="http://mysitename.freetzi.com/index.html"
Can you please tell why I am getting "File not found"?
The response status code is 401 if there is something wrong with your parameters. So you got the "File not found" error. But you can see the error message in the http header with Firebug. Your problem is if the oauth_signature_method is plaintext, you should add a %26 after your oauth_signature
Like this
&oauth_signature_method=plaintext
&oauth_signature=1daaeb467916f4331023fc5fce3cb6b6c27ac7ed%26
&oauth_version=1.0
Hope this helps.

10001 Internal Error when trying to capture an authorization from PayPal with Activemerchant

I've successfully made authorized a card, and it shows up in my sandbox transaction log. When I try to capture using that authorization (with activemerchant, which uses SOAP), this is the XML it sends to the server:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<RequesterCredentials xmlns:n1="urn:ebay:apis:eBLBaseComponents" xmlns="urn:ebay:api:PayPalAPI" env:mustUnderstand="0">
<n1:Credentials>
<Username>seller_1249669053_per_api1.synergyeoc.com</Username>
<Password>snip</Password>
<Subject/>
</n1:Credentials>
</RequesterCredentials>
</env:Header>
<env:Body>
<DoCaptureReq xmlns="urn:ebay:api:PayPalAPI">
<DoCaptureRequest xmlns:n2="urn:ebay:apis:eBLBaseComponents">
<n2:Version>52.0</n2:Version>
<AuthorizationID>0RF01309N5838270B</AuthorizationID>
<Amount currencyID="USD">2600.00</Amount>
<CompleteType>Complete</CompleteType>
<Note/>
</DoCaptureRequest>
</DoCaptureReq>
</env:Body>
</env:Envelope>
Paypal returns the ever so descriptive 10001 "Internal Error." Can anyone spot what's not right here?
Just for fun, here is what ActiveMerchant parses as the response from paypal:
=> #<ActiveMerchant::Billing::Response:0x3e00698 #params={"payment_status"=>"None", "correlation_id"=>"a188cc8c5f94c", "timestamp"=>"2009-08-11T06:21:22Z", "pending_reason"=>"none", "build"=>"997644", "transaction_type"=>"none", "error_codes"=>"10001", "version"=>"52.0", "ack"=>"Failure", "message"=>"Internal Error", "reason_code"=>"none", "payment_type"=>"none"}, #test=true, #authorization=nil, #cvv_result={"code"=>nil, "message"=>nil}, #message="Internal Error", #success=false, #fraud_review=false, #avs_result={"code"=>nil, "postal_match"=>nil, "street_match"=>nil, "message"=>nil}>
I'd LOVE it if someone could help!!!
Use non standard credit card number .
I was using standard credit card number '4111111111111111' and getting the 10001 error.
Used "4024007148673576" and it works for me.
All I have are long-shot possibilities.
The interface could have gone down for unannounced reasons after you authorized. Similar thing happened on the 3rd, returning 10001s.
Could be related to https://ppmts.custhelp.com/cgi-bin/ppdts.cfg/php/enduser/std_adp.php?p_faqid=169
I'd also try reauthorizing with a small amount, but it should have given a different error if that was the problem.
Though it shouldn't make a difference if the auth succeeded, you haven't shown us the authorize transaction.

Resources