How to show a contact in the browser after getting the ID using the Office 365 REST API - api

I'm using the Office 365 REST API to look for contacts. Once I have the contact details, I need to open a browser and show it to the user.
So, for example, I find a contact with ID:
AAMkADVlY2IzOGVjLWUwMzgtNGFmMS1iMzZhLTY2MDE0ZTRiNTg4NwBGAAAAAAD1KqAdSTtFQKuI5sWH1n87BwBFsSNh6xuxTYUopw458yHGAAAAAAEOAABFsSNh6xuxTYUopw458yHGAAAAABTzAAA=
And then I'm using the following URL to show it:
https://outlook.office365.com/owa/?ItemID=AAMkADVlY2IzOGVjLWUwMzgtNGFmMS1iMzZhLTY2MDE0ZTRiNTg4NwBGAAAAAAD1KqAdSTtFQKuI5sWH1n87BwBFsSNh6xuxTYUopw458yHGAAAAAAEOAABFsSNh6xuxTYUopw458yHGAAAAABTzAAA%3D
The browser shows a windows containing some information of the contact, but it's not the same information I have when browsing the Office 365 People app. I just get the name, and there is no way to see all the details or edit this contact. This is a screenshot of what I see when I open that URL:
And this is the information I would like to see (available when I use the People app):
Is there any other way to achieve this? How can I show the contact details to my user?
Any hint will be greatly appreciatted!
Thanks!

I wrote a simple sample application (in Angular, but it's just using REST so you should be able to use it) that uses the Outlook Contacts REST API to get a user's contacts and display them to the user.
In short, you should be able to get the information you want by making a GET request to "https: //outlook.office365.com/api/v1.0/me/contacts" to get all the contacts of the signed in user, or a GET request to "https: //outlook.office365.com/api/v1.0/me/contacts/{contact_id}" to get a specific contact. In either case, you must also supply an access token and make sure your application has the correct permissions scope.
View the code (and some links that may be helpful to you as you continue your Office 365 development) on GitHub: https://github.com/martellaj/contacts-api-sample

Related

Linkedin API for full profile access

I want to access the full LinkedIn profile information using the API, but I have only managed to access the basic profile and e-mail address with the API-key and Secret Key.
Am I missing something or is it more restricted in some manner?
How did you get the LinkedIn API ?
Did you applied for partnership because as far as I know LinkedIn changed the policy of API , so the API will be available only through the partnership and for that you've to pay different fee based on partner program
Have a look here, the same thins we've too.
I've fulfilled the application 3 weeks ago but no response yet.
***Subject: Having acces on LinkedIn API [160721-001958]****
I had spoken with one of our experts on this and he had confirmed for me that you can still go through other workarounds for this.
Go to https://developer.linkedin.com/partner-programs
Click on either of the options based on your need. You will be directed to another page where if you scroll down you will find the button for Apply to become a LinkedIn Solutions Partner. Click on that.
You will be directed to a page that says Apply to become a LinkedIn Partner and you can fill up the form from there for access.

Log in with a specific username with Google API

I am developing a web app for a group, and I want to be able to let anyone in the group create an event and add it to the group's calendar through the app. I was able to get the basic functionality working using Google Calendar API v3 for Javascript -- you could fill out a form with the event's start/end times, title, information, etc, and it could insert that event into the calendar.
But the problem is with authentication. If a user is logged in to a Google account that is not given permission to create events on the calendar, they are unable to add the event (Javascript writes "Forbidden" to the console). If I log out of all Google accounts and then sign in with the account that owns the calendar, the event is created with no problems (that makes sense).
Adding every single person in the group to the edit-permissions on the calendar seems like too much of a "brute force" method.
Is there a way to always authenticate the Google account that owns the calendar? Or, better yet, is there a way just to force authentication in general, even if someone is already logged in to Google / authorized to the app? Some people in the group know the calendar login/password, so if I could always bring up a Google login screen, they could just enter the calendar account information and then add the event from there. Again, I'm using Javascript (not much documentation on this...).
Thanks!
Have a look at Service Accounts. That way the calendar is owned by the application, and so the application will always have permission to update it.
If you want to avoid authentication problem from other opened session in user browser, you have to authenticate on the calendar, using server side library.
check this link:
https://developers.google.com/google-apps/calendar/auth
it bounces you from one article to other, but at the end you should get all information.

Google Contacts API doesn't return website extended properties

I've successfully got contacts information using the .NET library.
According to this question:
Get Google+ ID from Google Contacts
The contacts should be returned with an extended property called website that is a link to the contact google profile. However, none of my contacts are returned with this informations, and many of them are connected to a google profile.
I made sure I'm using the 3.0 version of the API but still no good...Does anyone knows what may be the problem?
Thanks!

Error when attempting to authenticate a user using the Google Contacts API

I came across this problem with a company's intranet that we run (powered by Wordpress) - it's got us all stumped.
When attempting to authenticate a user using the Google Contacts API, an error is returned after granting permission to access the user's contact list and before full authentication is given, but no details are given as to what the error actually is.
It was working absolutely fine until one day in late April/early May it suddenly stopped working.
We we're using the following scope: http://www.google.com/m8/feeds/contacts/default/full.
An interim solution has been put into place, using the Google+ API instead. This is working well, except that the API is not providing the user's email address after authenticating, only their profile details.
We absolutely need the email address in order to limit access to the website to people with certain email addresses, as well as intergrate properly with WordPress' user management, generating new user accounts and linking them to authenticated email addresses.
We'd really appreciate any help!
You're not providing much in the way of details, but Google+ Sign-in should have what you want, and it comes with pre-cooked PHP code, see https://developers.google.com/+/quickstart/php
Also, you can go through the basic login flow and if you use a scope like "openid email" you’ll definitely get the email address; see https://developers.google.com/accounts/docs/OAuth2Login

Google Tasks API authorization

I can see many related questions on SO, but none that answers exactly what I'm confused with.
I'm using Google Calendar API in a .NET desktop application that allows user to provide his/her username/password, logs in on his behalf and adds some events to the calendar. Now I want to do exactly the same thing for Tasks feature. I'm trying to use Google Tasks API for this, but have been told that I need to do some OAuth kind of authentication, and even before that, I need to go to my gmail account and set permissions and get my project "key" to enable it.
Now does every user of my application need to do these steps in their Gmail account? Or do I need to do this in MY gmail account once and then my application code will be able to use the generated project "key" to enable my users to add tasks to THEIR gmail tasks list?
Figured it out. For anyone having a hard time understanding this, here it is:
The "key" generation step needs to be done only once per application, not for each user who's going to use your application. To generate a key, login to your Google Account and go to Google APIs Console page. Click API Access button and that's where you can generate keys for different kinds of applications like browser apps, desktop apps, Android apps etc. After registration, you'll need to take Client ID, Client secret and API key from this page and put them into the code. Sample code (.NET) for task creation and several other Google features is available here.
Once your user runs your application, he'll be taken to his Google account in his default browser where he'll be asked if he wants to allow this application to write to his calendar/tasks list. This page will display your logo and description text too that you can provide at registration time. Once allowed, this step won't be required again in the next one hour (this may be adjustable, i don't know yet).