I would like to access skyDrive using REST in my website. I want to retrieve list of files and folders, download, upload and delete files.
I've got a microsoft live management site- clientID and clientSecret.
I am trying to figure out the reason of getting 400 bad request error
While trying to get access token, refresh token from live services.
I have also followed sample from Github but still having same issue.
https://github.com/liveservices/LiveSDK-for-Windows/tree/master/src/Web/Samples/OAuthServer/Asp.net/OAuthSample
I can forward rest of code if someone thinks can able to resolve it.
Thank you
Thanks a lot!
Related
This may be a dumb questions, but I haven't found an answer after lots of searching. I need to do two things, I need to allow my app to login to google, then save a file the users google drive.
I've found some steps on how to connect to google drive, but either its outdated or I don't have the correct libraries because it fails to compile: https://www.codenameone.com/google-login.html
Any help would be greatly appreciated.
For the login part there are good instructions in this blog post
Another sample of code to login to Google in this demo
You'll need to set the scope of the OAuth2 login to the appropriate Google Drive Scope
For saving files to drive, you should use ConnectionRequest to create the HTTP requests directly to their REST API.
Check the Integrating Google Sign-In into your web app. There's even an video guide explaining the concept.
There's a quick Save to Drive which enables your web site to allow users to save files to their Drive account from an arbitrary URL via their browser. If that's not sufficient enough, you can always check the Uploading Files where you can upload file data by creating or updating a File resource.
I have a YouTube class which uploads a video on YouTube using a OAuth authentication.
When I tested it on my local workspace, it worked fine but opened a browser asking if the access to my YouTube channel is permitted.
Now, my class should work on a server. There is no browser which can open and that's the problem.
Everything works up to this point.
Does anybody have an idea how I could redirekt/avoid or do anything else with this browser window?
Thanks a lot for your help!
Best wishes.
If you want to submit a video on behalf of an user, the user has to authenticate and authorize the application somewhere. (if you are using the v3 API)
There are flows which will work with an server-side application, though:
https://developers.google.com/youtube/v3/guides/moving_to_oauth#using-oauth-20-for-server-side-standalone-scripts
https://developers.google.com/youtube/v3/guides/auth/server-side-web-apps#Obtaining_Access_Tokens
thank you for your help!
The solution of my problem was to authenticate the access on my local browser and to copy the stored token to the server.
Best wishes!
I have been struggled with Youtube API and now I am stuck.
What I did is:
create a project at google developers console(https://console.developers.google.com)
enabled "YouTube Data API v3"
generate api key of iOS.
access to https://www.googleapis.com/youtube/v3/search?key={API KEY}&part=id&q=soccer by web browser and got the error message
Am I missing something?
I have read many questions but I cannot solved yet.
In step 3 "generate API key for IOS", the comment on the Google Developer Console web page says
Use of this key does not require any user action or consent, does not grant access
to any account information, and is not used for authorization.
Clicking on the *Learn More" button, it says:
Use an API key when your application is running on a server and accessing one of the following kinds of data:
•Data that the data owner has identified as public, such as a public calendar or blog.
•Data that is owned by a Google service such as Google Maps or Google Translate. (Access limitations may apply.)
I think you need to use the OAuth process rather than the API Key. Click on Learn More in the OAuth section of the Developer Console web page to learn about using OAuth with Apple iOS.
To create oAuth credentials for iOS:
Create new Client ID / Installed Application / iOS
I know it sounds a bit elementary, but I solved this same problem by going back into Google developer, creating a whole new project, new API key, and then it worked. Google quirk??
I am trying to get the refresh access token from AdWords API but the url generated by GetRefreshToken does not really work despite the fact I am logged in with the user that owns and created the API token.
Any ideas?
For other people who also get stuck in the new oAUTH2 auth. of AdWords, here's the solution.
In the google code console, when you create your project, in the consent screen you must fill in all the fields required for WEB application. This is because the url you hit provided by the php script requires web access permissions and if not provided you get a bunch of weird unrelated errors.
Hope this helps.
I have a corporate website that I want to pull in tweets to, but i'm getting a rate limit using the http feed. So, I want to use an authenticated method to get the tweets.
Do I really have to register an application to do this, even though it's not really an application and my users will never be entering or changing the twitter account info.
Also, my corporate site doesn't have a public address, and registering an application through twitter appears to require a public url. So how can I get around this? Do I have to create a "fake" application with a public url, just to generate my keys?
Thanks for any help on this.
If your site is behind a proxy server along with all your users, using Javascript/jQuery won't help. All the requests will still be coming from the same IP and will hit a rate limit, as you're doing now.
The other issue is that you don't need to register an app to request a feed. Apps are only needed for Oauth, and getting a feed doesn't need that.
The best way to deal with this is to get the feed with a server script, store it on the server, and then deliver the server copy to the web pages. If you request the feed less than 150 times per hour, you won't have a limit problem.
If you want more than a single feed, you can use the streaming API to get all the tweets for up to 400 keywords or from up to 5,000 users. This still doesn't need a registered app, since the streaming API still allows Basic Auth.
Just wanted to post this for future reference and in case anyone else has the same question. The solution to my problem, was to register an application on twitter. But since I'm just using a single user, you don't have to do the regular OAuth steps of generating a request for a key, getting the response etc. Every app you register in twitter get's its own "Access Token" that you can use to retrieve tweets etc. So, this is what I ended up doing to solve the problem I was having.
Additional details: My main concern was having to do the OAuth steps of requesting an access code etc... Since my application is only a single user implementaion (just pulling in our company related tweets from company held twitter accounts), it just seemed unneccesary to have to do all of that. But what I found was that when you register an app on twitter, you get a private access token for each app. You can view a little information about that here: https://dev.twitter.com/pages/oauth_single_token.
It sounds like you are pulling the feed down over http on the server? You could just limit the updates so you don't hit the rate limit.
I would recommend instead doing this on the client side. There are a lot of very easy to use embeddable java script twitter clients out there. The rate limiting problem would dissapear as the feed would be coming from the desktop and not the server (unless they just kept refreshing it).
The Twitter developer wiki lists a few.
JQuery plugin for Twitter
Tweet (another JQuery plugin)