LinkedIn API + WebKit - cocoa

I'm trying to use the OAuthConsumer library for Cocoa to connect to users' LinkedIn accounts.
Following the steps provided by the original author of OAuthConsumer, I set up the request token, and point a WebView at the resulting URL.
Now, with other services that I've used OAuthConsumer for (Twitter, Facebook, etc.), this part works fine. The user logs in, authenticates the app, and then my code kills off the WebView and trades in the newly authorized request token for an access token.
However, with LinkedIn, I'm getting the error "We were unable to find the authorization token". No more information; no error codes. Just a neatly rendered webpage full of useless.
So, I ultimately have no idea where to even beging debugging this issue, or whether or not it's a problem with my code at all. The few minor leads I've been able to find on LinkedIn's forums state that my "timestamp may be off" (though, not according to Epoch Converter), and I should check the "timestamp in the response". Seems like a red herring to me.
Edit:
Charles Session

So, it turns out the parameter for returning the request token is "oauth_token", not "token", as I was using.
Now, this would ordinarily just be a commentary on the inconsistencies of OAuth implementation, and my oversight. However, I'm a bit concerned because there were several instances (mostly using a browser) where using the wrong parameter in the return query would work: a serious inconsistency, and potentially severe oversight on LinkedIn's part.
At any rate, it works now.

Related

Cannot exchange short-lived token to long-lived token by instagram API

I should show the snapshot to you.
Unsupported request - method type:get
Even the official documentation said that we can only use get to exchange token to long-lived token,
I still tried the post method to experiment, it also failed.
More information:
I passed the validation about instagram_graph_user_profile and instagram_graph_user_media,
but I am still facing the problem like the snapshot.
If I added this user to our testing account, this problem has never shown again,
I'm really frustrated about this.
Our website is an easy application,
we use LAMP structure to build our website,
please help me to solve this out :(
I can give more information if you need :)

Could not execute google form api on google developer documentation

I got the below popup when I tried to execute the google form api from google developer documentation.
I tried this same process with google docs api which work perfectly. I tried tp turn on less secure app access, but it seems google made it unavailable.
what is the other way out.
Thanks
This appears to be a bug with the try me on forms.
I have logged it on the issue form and im going to see if i can find someone at google to ping about it
Forms.get try me not working
I suspect however that this may have something to do with the app being in early access. That being said i would have expected a different error message if that was the issue.
It is most likely due to the permission for the client they are using. It is an internal error and not something you have done.
May i suggest creating your own app and testing it that way. Just remember this api is in early access so be sure that you fill out the form found on this page Google Forms API now available in open beta
Developers can apply to join our Early Adopter Program and begin developing using the Google Forms API by filling out this form.

Google API Oauth consent screen stuck in verification for almost a year

I built a Chrome Extension using the Google Slides API ~8 months ago, with users having to sign in with the OAuth consent screen as to be able to use the extension. The extension has over a thousand users, and for the past weeks I've had reports of people seeing an error that says "Sign in with Google temporarily disabled for this app".
I checked and indeed the OAuth page was still "being verified", although it still said it would only take a few days / several weeks. I'm not using any sensitive scopes either, so it all seems very odd. If the app didn't meet the criteria I would have been rejected, but that doesn't seem to be the case.
So my question is, how can I get it verified, or if anything rejected so that I can make a new submission? I looked all over the place and I haven't found a way to get it unstuck. I'm pretty sure 8 months for verification isn't normal whatsoever.
Google seems to manually validate each OAuth screen. That's a long (and costly process), but to my experience, it generally takes 24 hours if you don't use any sensitive/restrictive scopes. As it's your case apparently, I presume your submission has probably being lost somewhere.
My recommendations:
Check in the Google Cloud Console the status of your OAuth Screen. After logged in Google Cloud console, click on the hamburger icon and select "APIs & Services" > "OAuth consent screen". At the top of the page you will see the status. If it's something like "pending verification", go to step 2. Otherwise, make sure the form is completed and submit it to verification again.
Search in your emails if you have been contacted by "api-oauth-dev-verification-reply [at] google [dot] com" (the address might slightly change as they use a ticketing solution). Maybe they tried to contact you but the email went to spam?
Get in touch with the OAuth team by emailing "api-oauth-dev-verification-reply [at] google [dot] com". Make sure to add your
Google Project number in your email, so they will be able to check
what's wrong.
Disclaimer: I don't work at Google. But I'm bit familiar with that process now :)

Google API + Oauth2 + Ruby - I cannot call APIs

I am using the sample code from Google to access drive and calendar through the API. I have no problem getting through the oauth2 sequence and getting the code. I can then exchange the code for an access token, although it takes way too much time (75 seconds). This is problem #1. Clearly I can't have a user sitting there for well over a minute to get the token.
When trying to actually pull data from an API endpoint, it times out after a minute.
I can use the APIs Explorer and everything works fine. When I try to hit it up programmatically from Ruby I simply can't get anything to work.
I can't even get Google's code to work:
https://developers.google.com/drive/api/v3/quickstart/ruby
I follow those steps, still get a timeout using their unmodified code.
I feel like I'm missing something really really fundamental here.
FWIW I have no problem running the PHP sample.

How can I log into gmail in a script/program using HTTPS?

My teacher has given me as an assignment to log into gmail and then send one e-mail or read the list of unread e-mails, but I can't use IMAP/POP3/SMTP or anything that isn't HTTP or HTTPS. I've tried looking for libraries in Ruby/Java to do it but nothing really worked for me.
I tried looking at the gmail source code page but I couldn't really understand what was going on. The page seems to call a post method on a link, but sniffing the packets what I saw was a GET apparently using a session generated using the info I send. So sending it "raw" didn't work either.
I've no idea what to do now.
After you authenticate with OAuth, you can get unread emails via an atom feed.
URL to hit: https://mail.google.com/mail/feed/atom/[<label>]
You can toy around with this at the Google oauth playground. Get an access token by continually clicking buttons and authenticating, and then hit discover feeds.
If you want a Java OAuth library, signpost is really good. You'll need to read the google documentation on its open authentication scheme. Specifically, you need to pass a scope query parameter when you attempt to authenticate. This is nonstandard, and it will trick you up if you're not looking for it.
If you're confused about OAuth or why its necessary, you may want to check out this resource.
Check out httplib2—it has (among other things) Google Account Authentication.

Resources