Confused about the API changes - api

Since LinkedIn support has moved to StackOverflow... here we go. It might seem like a stupid question though...
The LinkedIn API will move to v2 in the near future, but I am unsure which data will really remain available (without being a LinkedIn Partner).
I have been reading the API v2 documentation. This talks about r_basicprofile (which I have used with v1), but this will be replaced with r_liteprofile. (I quote: "This API will only recognize a new “Lite Profile” permission, which supports a reduced set of member profile fields.")
So, r_liteprofile only has a couple of data fields (first name, last name, maiden name, profile picture). In the future, how am I to get the LinkedIn profile URL from this? And some other information that is not necessarily privacy sensitive?
If I try to get more data through r_liteprofile it doesn't show them, which would be expected behavior according to the r_liteprofile documentation. But how am I supposed to link to people's LinkedIn profile from my application? Doesn't LinkedIn want people to come back to their platform through other websites?
So, in conclusion:
After March 1st, will there still be a way to get the profile URL, and perhaps the headline and industry ID?
The obvious answer is "no you can't". I'm just hoping for a "yes you can".

In short: it's not possible to maintain the r_basicprofile fields without applying for a LinkedIn partnership, starting March 1st, 2019 (when the transition from the LinkedIn API v1 to v2 will be made).

From the migration docs:
"Looking to maintain access to the Basic Profile fields? Learn more about applying to a LinkedIn Partner Program."
https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq?context=linkedin/consumer/context#what-are-the-main-differences-with-the-new-sign-in-with-linkedin

You can get more fields by specifying them in url:
https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))
You can find more fields here https://learn.microsoft.com/en-us/linkedin/shared/references/v2/profile

Related

OpenAlex API - How to get institution ID?

I am trying to use the OpenAlex API: https://docs.openalex.org/api
This API provides access to a catalog of scholarly papers, authors, institutions, etc...
It is easy enough to make a query for an institution's information such. Here is an example from the API docs:
https://api.openalex.org/I19820366
I am trying to figure out how to get a specific institution's ID.
In the docs, there is a statement that this ID number is Microsoft Academic Graph's institutional ID: https://www.microsoft.com/en-us/research/project/microsoft-academic-graph/
But I have been unable to figure out anything in Microsoft Academic Graph either.
How can I find the institutional ID for a specific institution?
I am a beginner, and I also just started to retrieve data from the OpenAlex API. For me, the easiest way was either to use the ROR id or the GRID id, which you can both look up for any institution either here: https://www.grid.ac/ or here: https://ror.org/
Then you use either ROR or GRID-ID as an identifier (https://docs.openalex.org/about-the-data/institution#ids) and that identifier as a filter, as specified in the API documentation.
Be aware, that except for the Institution-ID, that you want to find, all the other institutional IDs, like ROR or GRID, have to be put in your request as a full URL. Take the example of the Johns Hopkins University. It's not enough to put their ROR like this: "00za53h95", you have to put in the API request like that: "https://ror.org/00za53h95" (without the quotes) or else it won't work. In my example, a request could look like this:
https://api.openalex.org/institutions/https://ror.org/00za53h95
This will deliver a nice json file with all the info you need, including the institution's ID in the database. Save the information as a file by using a cURL GET request or just do it via your browser and get the result as a webpage, both works. If you do the latter, you should follow the suggestion of the OpenAlex team and install a browser plugin like JSONVue, that will make the experience of reading the result on your screen so much better.
Hope that helps.
You can use the OpenAlex API to search for the ID like this:
https://api.openalex.org/institutions?filter=display_name.search:University%20of%20Virginia
In addition to Heather's comment, I'd like to add that we can now go to https://explore.openalex.org/ and search for any entity. Start typing "Johns Hopkins University" and you'll get to this page: https://explore.openalex.org/institutions/I145311948 which has all the identifiers (including the openalex id I145311948) and additional information about this institution.

Limitation on requests for an Ad / Adset / Campaign history from Facebook Marketing API

I currently want to get the full history of an Ad account on the Facebook side. Having read the documentation:
https://developers.facebook.com/docs/marketing-api/reference/ad-activity
I expected to get all the events done in this account but found that I could only get one week of data. Something that is not indicated in the documentation.
Is this normal?
Please make sure to read the Graph API docs. In this case, pay attention to the time-based pagination part. You can specify the since parameter (which expects a Unix timestamp, more on it in the link above) to specify the start of the data you are requesting.

How can I deep link into QuickBooks Online with results from API calls that don't include the txnId

QuickBooks Online (QBO) uses a URL format like qbo.intuit.com/app/timeactivity?txnId=123 to point to, in this example, a TimeActivity.
However, in the API, resources are referenced by entityId (returned as just Id when querying via the TimeActivity API), which is different from txnId.
In my time tracking web app, I have a feature that exports time to QBO as TimeActivities. I'd like to provide users with direct links from the time entered in my app to the corresponding TimeActivity in QBO—is there any way to do so?
The answer to this is that it's not currently possible because there's multiple base URLs (I think they call them "realms") in use for QuickBooks Online (qbo.intuit.com is only one of them). Because you do not receive this information as part of linking to QBO via OAuth, there's unfortunately no way to construct proper links.
Yes, when creating a successful TimeActivity you will receive back an Id, which I assume you are persisting.
That Id can be used to query QBO in a simple GET request.
<baseURL>/company/{companyID}/timeactivity/{timeactivityId}

March 6, 2013, access tokens and /me/accounts/

So. According to the pending March 6th changes, I have question regarding the "Removing apps from /me/accounts/ and page_admin FQL table" change.
This change seems, to me, imply that you are also going to remove "/<user_id>/accounts/" - is this the case?
Because I'm using "/<user_id>/accounts/" to get non-expiring access tokens (c.f. https://developers.facebook.com/roadmap/offline-access-removal/#page_access_token).
Cheers!
Tomage
Note that the roadmaps states they will "longer show apps under /me/accounts/". The endpoint, with access to Pages, will still be there. Just the apps that are currently in that list will not be. If you want to get the apps they are a developer of, the docs state " hit /me/applications/developer/ or use the app_role FQL table."
https://developers.facebook.com/blog/post/2013/02/27/platform-updates--operation-developer-love/

Twitter REST API consistency with ID placement

Can someone explain to me in, in REST terms, Twitter's design decision with the parameter placement in these two calls? It seems that the :id placement is inconsistent and arbitrary (although clearly this was deliberate).
GET statuses/:id/retweeted_by
Show user objects of up to 100 members who retweeted the status.
GET statuses/retweets/:id
Returns up to 100 of the first retweets of a given tweet.
There are other similar examples throughout their API (https://dev.twitter.com/docs/api), so I'm definitely missing something.
Thanks!
Just making guesses here
Someone at Twitter once pointed out that the Twitter API runs on several servlets. I can only assume that this was related - it's easier to map /retweets/* than to map every single combination.
Update: I think that the history of the API itself can also be relevant. Twitter's API hasn't really changed much over the past years, and if it did change then it would be because new features would be added. An endpoint like GET statuses/show/:id is old, while GET statuses/retweets/:id is newer. If Twitter at some point decided to change naming conventions, they couldn't just rename the old ones, since it would break applications.
Another theory of mine is that GET statuses/retweets/:id actually doesn't refer to the Tweet :id itself, but is about the tweets that were based on it. GET statuses/:id/retweeted_by is directly related to the tweet itself, by returning users and not other statuses.
I too am often puzzled by the naming consistency. I'm sure they have their reasons though.
I ended up checking with a friend at Twitter, who says:
"I just talked with the guy who originally wrote those two API
endpoints, and he doesn't remember why. To answer your question,
though, there probably isn't a good RESTful reason for that design."