Linkedin OAuth 1.0 no longer posting to company wall - linkedin

We have a [legacy] PHP app that is using an old integration to Linkedin (Also using legacy Oauth 1.0a) to post to our users personal, and company wall.
Recently (End of July) we started receiving 500 errors when posting to user's company walls. If the user to chose to post to their personal walls the requests post just fine, it's only the company walls that reject the postings.
The users are admins of the walls (We provide a list of walls the users are admins of that we have previously fetched, and are renewed every time a user wants to post). In the even of the user posting both to their personal wall and company wall at the same time, the personal one succeeds while the company one fails.
I did a quick test using Oauth 2.0 and posting the same data, and it posted just fine.
Anydoby knows what could be the problem, or if Linkedin made any change in their API? According to their documentation, even if use of Oauth 1.0 is not encouraged and the API documentation is not available anymore the service is not deprecated.

On the homepage of https://developer.linkedin.com/ it states:
Effective May 18th, 2018, our Company Pages API will no longer work
with OAuth 1.0. We recommend all apps switchover OAuth 2.0
authentication before then.
So I'd suggest you switch to OAuth 2.0 to maintain your functionality

Related

Woocommerce Membership REST API check if user has a membership plan

I ma developing a mobile app with a wordpress backend that was developed by someone else and the person is unreachable. I have the usual Woocomerce membership plans built on the backend. The website works perfectly fine. The issue is this
I checked the REST API endpoints through 'discovery' and found all the usual endpoints, but my issue is how will i test the if the user has a membership plan via REST API. I have already wasted a lot of time figuring out the solution.
/wc/v3/memberships lists all the endpoints
/wc/v3/memberships/plans/ lists all the plans
when i make a call to all these endpoints, it gives me all the users which have memberships.
My question is how would i know if the current loggedin user has purchased a membership, there is no such specific endpoint to it, plus the docs are not very specific. They are vaugue. Good enough for a beginner but not for a production level.
This is the url which i am referring to, which i got from the "official" Woocomerce Membership website
https://skyverge.github.io/woocommerce-memberships-rest-api-docs/#get-user-memberships
Use this endpoint :
GET http://example.com/wp-json/wc/v3/memberships/members/
Just replace with current user id. you can get current user id through this endpoint :
GET http://example.com/wp-json/wp/v2/users/me

How do you apply for a refresh token in the LinkedIn API?

We have a client application that runs on Windows that is used by thousands of users in the financial market in order to make analyses and charts. Since long we have an integration with Twitter where you can easily post a chart together with short text. Many users have asked us to implement a similar feature for LinkedIn since this is becoming increasingly popular among our users.
The API for sharing on LinkedIn works fine for us, but we need to refresh the access token every 60th day, which cannot be made completely seamless for the user. Since our application is not a web app, we need to launch a browser on order to refresh the access token and this is disruptive for the users.
The docs at Authorization Code Flow (3-legged OAuth) says that some selected partners can get refresh tokens as a complement to access tokens. That would be perfect for our integration. How can we become one of those "partners"? I have not found any information how to apply for this.
I have looked for a way to apply to become a partner that can get a refresh token, but failed to find any information.

With the new r_liteprofile is it possible to know the authenticated user's LinkedIn profile URL?

We're using Sign in with LinkedIn, which is deprecating the r_basicprofile scope that offered the profile URL. I don't see a way to get this information using the new r_liteprofile scope. Was that intentionally left out? It seems odd that LinkedIn wouldn't want to drive people back to their own site.
Deadlock :) or just changes of LinkedIn policies.
According this tiny article Public Profile Url you have to use vanityName which is available from r_basicprofile which is not going to be deprecated but available only for Enterprise LinkedIn users :(
Quoting from Self-Serve v1 to v2 API Migration Frequently Asked Questions:
Looking to maintain access to the Basic Profile fields? Learn more
about LinkedIn Developer Enterprise products.

Avoid login prompt for Company data with Consumer Partner?

We are trying to show the company updates done for our company on LinkedIn in the companies intranet. After visiting the developer site, we are able to create the token and pull the required information. The challenge is with the login prompt that would come up on the intranet home page. We want to avoid it.
This post mentions we need a token (that we have) and also user should be logged in to LinkedIn. So we guess it is a limitation.
However, the developer site mentions about 'partnership with Linkedin' and says if you become a consumer partner following is possible. It says you have higher functionality and thresholds.
"Create personalized and engaging user experiences for your audience by combining LinkedIn data and functionality into custom websites and mobile applications"
We tried reaching to Linked Developer Support with no response from them. Can anyone here confirm if we can Avoid login prompt for Company data with Consumer Partner?

LinkedIn New API - Can't Get r_network Permission

I inherited a program that was written with the old LinkedIn API, and I'm trying to migrate it to the new API. When I try to get the r_basicprofile permission, my oauth token works. However, when I try r_network or rw_nus, I get a response
invalid scope -- your application has not been authorized for
r_network.
Yet, when I go to www.linkedin.com/developer/apps/xxxx/auth, the boxes for r_network and rw_nus are checked.
I.e., A request to
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=xxxxxx&scope=r_basicprofile&state=yyyy&redirect_uri=http%3A%2F%2Fkalatublog.com%2Fwp-content%2Fmu-plugins%2Fimb-en%2Fhelpers%2Fsocial-connect%2Fapi%2Ffinalize.php%3Fapi%3Dlinkedin%26ch%zzzzz
works, but a request to
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=xxxxxx&scope=r_network&state=yyyy&redirect_uri=http%3A%2F%2Fkalatublog.com%2Fwp-content%2Fmu-plugins%2Fimb-en%2Fhelpers%2Fsocial-connect%2Fapi%2Ffinalize.php%3Fapi%3Dlinkedin%26ch%zzzzz
gives that error. What am I doing wrong?
As of May 15,
After the grace period expires, several REST API endpoints will no longer be available for general use. The following endpoints are the only ones that will remain available for use:
Profile API — /v1/people/~ `
Share API — /v1/people/~/shares
Companies API — /v1/companies/{id}
If your application is currently using any other API services (e.g. Connections, Groups, People Search, Invitation, Job Search, etc.) you will have to apply to become a member of a relevant Partner Program that provides the necessary API access to continue to leverage any of the endpoints that are not listed above.
It looks like linkedin no longer wants to share anything with their API. Creating a new app indicates that the only possible options are r_basicprofile, r_emailaddress, rw_company_admin, and w_share:
TLDR: they have locked down the API and restricted the usage to an extremely limited set of access points.
I did some more digging. The linkedin website is misleading. On my app linkedin page, it says that I'm approved for rw_nus and r_network, but on this page
https://developer.linkedin.com/support/developer-program-transition
it says those are no longer approved.
So the app home page in linkedin incorrectly said I had those permissions.
Heres the link if you want to Apply for Linkedin
https://help.linkedin.com/app/ask/path/api-dvr

Resources