I have a program written in Java that uses the Exchange Web Services (EWS) API to create appointments on users' calendars via impersonation. Now I want to create Lync meetings instead.
I thought I could just set the IsOnlineMeeting property to true and be done with it, but apparently this property is useless.
The next idea I had was to use the UCMA, but it seems like you can't call UCMA from Java.
I am looking into using UCWA, but it sounds like it doesn't support impersonation.
Each user has a unique Lync meeting URL. Since UCWA doesn't support impersonation, your application will need to somehow get the user's credentials to sign in and get an OAuth token. Once you have that, you can call Lync to get the JoinUrl (same link as Richard). Once you have that JoinUrl, you can place that in the body of an appointment you make with EWS.
There is a Lync (UCWA) API to do this at http://msdn.microsoft.com/en-us/library/office/dn356790(v=office.15).aspx
This API does not support impersonation, so if you want to create a Lync meeting on behalf of another user, your application will need to somehow get the user's credentials to sign in and get an OAuth token. Once you have a token, you can call the API to get a JoinUrl.
If desired you can then place the JoinUrl for the meeting in the body of a calendar appointment you make with the EWS API.
You could call an external program using Runtime.exec().
i've an experimental java api which can communicate with Lync 2013 UCWA.
Here is the github page
Related
We are developing a Java application that is supposed to show models from users store.
initially, I'm trying to allow users to login using their autodesk account, and check if they are entitled to access my app.
I couldn't find any good example to show how it is done, I just want to confirm that what I will be doing is the recommended thing or if there is better options.
First, on app start, I will show an embedded webbrowser that will open
"https://developer.api.autodesk.com/authentication/v1/authorize?response_type=code&client_id=XXX&redirect_uri=XXX&scope=XXX"
the app will get the url from our server (so not saved locally) and the call back is pointing to an api on our server. then as user login and consent, will get the code from the url, close the login dialog and continue to get the bearer token using plain rest apis to /authentication/v1/gettoken.
As I said, not 100% sure if this is approved way or not or even if it is doable or not. so thought to check before we implement it.
After that I will just use rest apis to browse and get the model.
any thoughts or complains ?
Thanks in advance
Rest assured that the workflow being proposed here is actually orthodoxical and well “approved” by our official tutorials:
https://forge.autodesk.com/en/docs/oauth/v2/tutorials/get-3-legged-token/
http://learnforge.autodesk.io/#/oauth/3legged/
Unfortunaly the code sample for that bit is in node and we are still working on a Java equilvalent
Some of our endpoints require 3-legged oauth to access personal data - see here for an example and you can always refer to the authentication context section of each endpoint for the oauth flow required.
We are developing a webportal for our users. This webportal includes functions to find the users address. In the backend we use Java to provide a rest resource. Since we don´t want the user to login we wonder, how to secure this rest resource so no one else can use it.
Any suggestions, keywords or best practises?
Well one simple solution if you want to avoid logged in users is to use a header param with a secret value then it is a bit harder to break into the system. This header is then sent from the webportal and read and validated by your backend system. And use https.
I want to use the 'plus.people.get' API call from the Google Plus API, without a user login. Similar to what the API explorer is doing.
I know that I will need to register my application and provide the client id and cleant secret, but I can not figure out on how to call the API. All examples I found explain how to do user login..
Thanks in advance for any links.
For un-authenticated access to the API functions you will need an API-Key. Client ID/Secret are only necessary for OAuth.
If you do a request on the API explorer it will display a URL like this
https://www.googleapis.com/plus/v1/people/<userid>?key={YOUR_API_KEY}
If you are using simple HTTP requests to retrieve data you just have to replace {YOUR_API_KEY} accordingly.
If you are using any of the client libraries, they all have methods to set the API Key, which will then be appended to all calls automatically.
You can get an API Key similar to how you get Client ID/Secret from the Google Developers Console. Just look for "Your Project" -> APIs & Auth -> Credentials and use "Create new key" there, if one hasn't been created automatically already.
I have couple of doubts regarding the usage and working of /venue/stats Foursquare API.
Q1. I would be using /venue/stats for getting information provided a venue id. So I have registered my app and got the client id and secret values. I went to Foursquare API endpoint and tried using /venue/stats api and I noticed a oauth_token generated automatically by FSQ so is this oauth_token the same token that I am required to use everytime I use this api ? Do I need to do the authentication steps mentioned ?
Q2. Try the api generates a link which has /simulate in the api URL. I assume that this is due to the fact that I am testing the API so FSQ has categorized such api calls as simulate calls. Please confirm my understanding. If this is so then whenever I use the api as mentioned i.e. /v2/venues/venue_id/stats I get an error JSON stating that I am unauthorized to view venue stats. Can you please tell me why ? If this is due to access_token issue then the same issue should have been with simulate call also ?
Hoping to get a reply soon.
Right underneath the API Explorer bar it says "OAuth token automatically added". You do not use this token. I am sure it is either temporary or created using your log in info if you are loggged in while using the API Explorer. You will still have to use the authentication process to get a valid access token. However, you can save this access token and use it again skipping the Auth process. An access token serves as a key unique to a user and app. Read more about it here: https://developer.foursquare.com/overview/auth
The simulate feature is used mostly for API calls that normally would require you to be a manager of the venue. There are certain calls that can not be done unless the app is by a user that is the manager or unless you make the call using an access token of a manager.
I am developing a Java application that needs to access personal account Google Data of a user. The development is currently in netbeans on my localhost. I am implementing 3-legged OAuth. And while sending Grant request, it sends me Unauthorized Request Token and then redirects to Callback URL.
While trying to access Access Token, it gives me Error "Error Getting HTTP Response". Now, as per it given in Google Documentation, it is given that "If the application is not registered, Google uses the oauth_callback URL, if set; if it is not set, Google uses the string "anonymous"." Does it mean that I must register my application on Google Apps Engine before granting authorization & accessing request ? Please Help.
For reference : OAuth for Web Applications, OAuth in the Google Data Protocol Client Libraries
Based on your question, it's probably not the registration piece that's causing you trouble. It sounds like you just haven't implemented OAuth correctly — not that doing so is easy. The OAuth process is roughly as follows:
Get a request token. You must pass in a bunch of stuff that declares what kind of stuff you want access to and where you want Google to send the user when they're done granting you access to that data. This is where you pass in your consumer key, which you get by registering. The consumer key will be the string anonymous if you are developing an installed application (i.e., mobile app, desktop app, etc). This is a work-around; the alternative would be to embed your client secret or RSA private key within the application itself, which is a very, very bad idea. If you use 'anonymous', you should absolutely be setting the xoauth_displayname parameter. (Actually, everyone should set this parameter, but it's especially important if you're using anonymous.)
Once you have a request token, you then redirect the user to the special authorization endpoint, passing along the request token key in the query string. Assuming the user grants access, Google will redirect the user back to the callback URL that you associated with your request token. The request token is now authorized, but it can't be used directly just yet.
Once the request token is authorized, you can exchange it for an access token key/secret pair. The access token key/secret can then be used to sign requests for protected resources, such as the private data in the API you're trying to access.
For web applications, registering is almost always a good idea. It makes it much easier for users to manage their access tokens and revoke them if your application misbehaves or if they don't want you to have access anymore. If you don't register, your application will probably show up as a fairly scary-looking 'anonymous' in that list. It's really only installed applications that you wouldn't want to register for. You probably also want to register for an API key. An API key will dramatically increase your rate limit and it will also allow Google to get in touch with you if your application starts to malfunction.
I'd link to the OAuth docs, but you've already found them. Hope my explanation helps!
If you're developing on your local machine, you'll continue to get the same result as above.
For more interesting tests, then yes, you'll have to register your app and push it to the app engine.
Google will check if the domainname of the return-url is registered. You could also modify your dns/host-file to point the domain-name you're using to localhost.