Request to retrieve by an API the profile URL (vanity name) - linkedin

We're applaime - developing an AI driven product which will help job seekers to manage more effectively the job application process.
The product will enable Linkedin oauth authentication after which it is expected to retieve the current user's basic profile.
Hence we would like to apply for this permission (r_basicprofile). How can we get this process in motion?
Thanks.
Trying to fetch the basic profile via an API. Need permission for that.

This page describes how to get access to the various APIs: https://learn.microsoft.com/en-us/linkedin/shared/authentication/getting-access.

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

Is it possible to integrate google analytics dashboard to our own website?

I want to show google analytics dashboard to my users. It is not possible to give access of "google analytics dashboard" to all users. So I want to integrate it on my own website. Will it be possible to integrate google analytics dashboard on a particular website?
This question gets asked quite a bit. It is important to understand the security model for the API. All Google APIs use OAuth2.0 to authenticate the user. This is designed to make it easy to use the API to access the Users's data on behalf of the user. In contrast you will need to do work to show Your data to your users.
With that said, an example of what you are looking for is the Server side Auth example provided by the Analytics API team.
The simplest answer is to query the API on the server side, with a service account and serve that data as you serve any other data to your users. Read the scenarios in detail, and pick one that best suits your end goals. Understand how the API views the following entities.
A User uses an application.
A Developer develops Application.
An Application has a project id and its associated credentials.
A user authorizes an application to access their data via the API.
You are breaking this paradigm because you are the user and developer from the API's perspective. You want to share your data with people who are not authorized to view it, so you will need to use a service account to access that data and share it directly with your users.
Also remember to add the service account to Analytics View you wish it to access.
Check out EmbeddedAnalytics if you prefer not to get bogged down learning oAuth2, the CoreReporting API, and lastly a charting tool. We simplify the process. All you do is create your chart and embed a snippet of code in your site where you want the chart/dashboard to show.

How can I get linkedin contacts through API and send messages to them?

I had created app that used to get authenticated by users for their contacts, sending messages to those contacts etc. When linked in changed their API access system in May, suddenly our application stopped working.
In the doc there is nothing clearly written about these kind of permissions now or with what kind of membership program I can get access to these again. There is one section where contacts info can be fetched when we apply for partnership program with Apply with LinkedIn button. But I am not sure its of my use.
Access to r_contactinfo permission:
As per the Linkedin website,
The r_contactinfo member permission will now be associated exclusively
with Apply with LinkedIn. As a result, you will only be able to
request this member permission if your application has been approved
by LinkedIn for this particular use.
What you need to do:
Apply for partner status with LinkedIn (Apply with Linkedin), explaining what your integration is and how it works. If it meets their criteria, then you will get access to the above endpoint.
Check this link for further details.

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

Google Analytics - Access custom segments through Service Account

My application needs to fetch Google Analytics data from backend servers.
I am using Google Service Account in my application.
Though I have given all permissions to my service account through Google Developer console, it turns out that my service account cannot access custom segments of my user account.
A way could have been to copy these segments from user account to service account, but there seems like no way to login via service account and be able to copy segments from user account to service account.
So, there seems like no way to be able to fetch custom segments in a web application from backend...
Is there any way to do so?
Can any other account(web application, Installed application account) serve my purpose?
Reading the documentation of above two Google accounts reveals that user would be prompted for authentication (at least once) during authorization in these 2 accounts which is not feasible in backend servers.
I found a similar thread for my query Google Analytics V3 - How to create custom segments for API Service Accounts , but user in this thread resorted to not using segments at all, but I do need to use them in my account.
PS: I am writing my application in RubyOnRails and would be using Ruby Gem for Google Authentication
Answer: No there is no way to add segments to the Service account. Even the Mangment api only allows you to list segments not add them. Segment Management API documentation
An Idea: You could us normal Oauth2 Authenticate it using your account, Save the refresh token someplace and use that in your application to see the data. Then it would be like the Application is always you and would be able to see your segments.
Sorry I don't know ruby so I cant help you with getting the idea working.

Resources