As far as I know, when I developed a console app using YoutubeAPI to create live events for streaming, youtube required me to choose the account which was enable live streaming to put live events on.
But when I developed a website app using that API, even though I opened icognito browser to create live events, it still used my first account in Chrome to create live event.
I wondered if there is some way to make this API to select user like what happened in console app.
I think it is because of the client_secrets.json but I don't know how to fix it.
I am using C# to develop
All of the Live Streaming endpoints require OAuth, you must be authenticated as the user you wish to stream live with. You cannot stream on another user's behalf unless they have logged in and provided a valid OAuth token to use for your requests.
Related
It would be great if somebody could help me with strategic input, how to achieve my goal:
I wrote a C# Desktop Application (WPF)
I have a Google App Engine Project, which delivers Data for an Android App
Now my Desktop Application needs to pass some Data to my App Engine Application. Therefore, the Application must authenticate as Owner of the App Engine Application. As, all other Google Methods are deprecated, I have to go heading OAUTH2 to let my Desktop App authenticate itself as owner.
Therefore I have to register a project at Google Apis Console.
BUT:
I dont need any Service(s) of the listed Google APIS (Maps, ...), because to authenticate as Owner, its absolutely enough to sign in to a Google Account (GmailAccount, Google Account, whatever). This lets my App Engine App recognize me as Owner.
I would appreciate advice about:
Should I register a project without Service just to Sign In via OAUTH2?
(Is this possible?)
Sign in to another Service (means, taking the easiest way, just to be able to authenticate as Owner) seems not to be very "clean" sollution. Is this right, or should I go this way?
.. I also read about Service Accounts, but dont want to use this, because I want to be able to manipulate my app also via my "Human"-Account via any Webbrowser.
Thanks for any advice!
You can provide Google OAuth sign in without using any of Google's other services. Your OAuth client would just have an empty scope. You should be able to get the basic user info and email (so you can figure out who is who by something other than full name) without enabling any services as well.
You will still need a way to flag that you are you in your app (probably just hardcode your email in your app, then check it against who authenticates with OAuth would be the easiest)
I want to write an application which can update an twitter status of an certain twitter account.
The user has to log in to twitter.
I want to make this application with Twitterizer, but since it uses oAuth, the user needs to go to the twitter website to tell twitter that my application is granted access to the user's twitter account.
Because I want to make a very simple twitter application for people who are not really even expert with computers, I don't really want that process.
Is there any option to automate the web UI of the oAuth process? Or an option to don't use that web UI?
The purpose of OAuth is to ensure that the user is aware that they are granting a 3rd party access to their account. If OAuth allowed the process to be automated, it would undermine the very reason it exists.
One way around asking the user to copy/paste a PIN, is to use the HttpListener class to create a simple webservice that runs on the client's computer. You can create it long enough to listen for the user to be directed back to the callback url and capture the values needed. I've demonstrated this technique on my blog.
Just as commentary: to say "but since [Twitterizer] uses oAuth" insinuates that it was my design decision (I'm Twitterizer author), where it is really the security protocol required to interact with the Twitter API. Every Twitter library requires the use of OAuth.
We have a chat application which works on ASP.Net web applications. We want to allow users to make calls to other users through our chat application. To provide that we want to make use of Microsoft Lync 2010 and use their SDK to leverage its capabilities and make calls. Any pointers on how to do that will be of great help.
You have a couple of options here - you could use the NameCtrl control to integrate presence and a pop-up menu into your aspx pages - see my answer here for more details, and an example.
Assuming you're not using Silverlight, you could create a .NET assembly that uses the SDK to initiate a call (see the walkthrough here), and then expose this to COM using .NET's COM Interop features - example here, if you haven't done this before
Also, Sevki's answer is a great way to get up and running quickly, although you won't be able to get the presence of the user that way.
All of this assumes that the users have Lync running on their machine, i.e. assumes you won't be opening chat up to users outside your organisation who may not have Lync installed.
Edit: Not having Lync installed changes things a lot. If Lync is installed, then Lync will handle setting up the audio call, and will handle the transfer of Audio between the participants in the conversation. Without Lync, you'd have to do that yourself, which won't be straightforward.
Your best bet might be to have your users use the Lync Web App. This is a web based client that allows external users to join conferences. You'd need to build a UCMA 3.0 application which would sit inside your Lync infrastructure. The app would:
Accept a request from your web app to start a new conference, inviting the desired user - see here and here
When the conference is created, get the id and return it to the web user
In the web client, use the returned id to build a URL that opens the Lync Web App.
I can't remember the syntax of the url off the top of my head, but to get it, you could create a new conference using the Lync Client, then select Invite By Email (from the icon of two "pawns") - this will generate an email containing a URL - clicking the URL take you to a page that gives you conference join options, including installing the web app (you'd need to try the URL on a machine that doesn't have Lync installed to get the option to install the web app)
Edit: My bad - the Lync Web App doesn't support Audio. You could actually use the same concept as above, but with the Lync Attendee Client instead. However, this forces the user to install some components client side, so may not be acceptable in your scenario.
Edit: See also the answer here for more details, this refers to getting video to the client, but is relevant for audio too
You could create a hyperlink like so
<a href=”tel:{blah phone number}″>{blah phone number}</a>
or
<a href=”sip:{blah sip blah}″>{blah sip blah}</a>
Which will launch lync from the browser, however if you want to do it inside the browser it seems that you will have to go in to Silverlight. You can find Silverlight samples in Lync Client Side API sdk.
There is an hour-long intro to integrating Lync recorded at Tech-Ed Europe at the end of last year. I've not watched it yet, but it looks quite good.
http://channel9.msdn.com/Events/TechEd/Europe/2010/UNC306
I am writing an app using WPF 3.5 and I need twitter integration.
I know that there are many API's for C# and most of them seem to be on the right track.
But one, painfully annoying (seemingly 100% required) step of the twitter posting is that you need to redirect the user to the twitter website, in which they need to login and click "allow" which then shows a PIN number which the user must enter in to my client app in order to simply tweet.
This is so cumbersome and annoying for each run of the app, I dont mind a once off thing, but each time?? Am I not doing this right, why isnt it just a once off allowance of a registered app? How do apps like TweetDeck do it so that they dont have to re-approve each time I load the app?
You need to store the token and the key provided by the server when you perform the OAuth authentication. You can continue to sign your requests using those keys. I'm not entirely sure which library you're using, which makes it hard to say, but there should be a means of retrieving the key/token that Twitter provides you with and passing this back in as a means of authentication.
One other alternative is to use xAuth, which makes it a little easier for your app to authenticate the user. The downside is that it's pretty oblique and might not be supported by the library you're using.
Good luck!
I’ve been asked to integrate a windows form application with SagePay to take payments directly from the application. The SagePay documentation talks about ASP.NET so I’m not sure whether this is possible. Has anyone integrated a WinForm application with SagePay before? Is it possible?
I know some payment processors have a connection option where the payment part is hosted on a form on their server. You could try embedding a web browser control into your app to display the payment page.
Usually there is another type of connection option where you can send your information via HttpWebRequest, but I'm not sure that this would work as it requires SSL. Since you are running your app as a desktop client, I'm not sure what you would have available.
I am not sure this is possible given that sagepay needs to redirect users to Mastercard securecode or Verified by Visa, I think they would need to redirect to the bank which then redirects back to a supplied URL. I would think this needs to be within a browser environment.
You can post to urls and get back a response via .net objects and parse the results to display on a form.
You can also ask SagePay to create a Vendor account with 3d secure switched off. This allows you to take payments in house in your winforms app without the customers password however most card vendors if you bypass 3d secure will not protect you if someone calls and uses a card fraudulently.
However it can definitely be done.
You can normally post to secure servers from non secure pages so again this isn't usually an issue.