I tried to fetch Linkedin connections of logged in user with below API Request,
https://api.linkedin.com/v1/people/~/connections:(id,firstName,lastName,email-address)?format=json
I got this error,
{
"errorCode": 0,
"message": "Access to connections denied",
"requestId": "OFP0JOLOHO",
"status": 403,
"timestamp": 1438683812562
}
So how can we fetch all connections using Linkedin API?
please use this URL as your API Request
https://api.linkedin.com/v1/people/~:(id,num-connections,picture-url)?format=json
It works for me
Related
I have created new YouTube account for test purposes. I got an accessToken for this account and tried to get my own subscriptions via YouTubeAPI.
I use Google APIs Client Library for PHP.
$data = $service->subscriptions->listSubscriptions('snippet', ['mine' => 'true']);
I get an error:
"domain": "youtube.subscription",
"reason": "subscriberNotFound",
"message": "The subscriber identified with the request cannot be found.",
"locationType": "parameter",
"location": "channelId"
"code": 404,
"message": "The subscriber identified with the request cannot be found."
I tried to change the YouTube account, and I got a successful result on my old account. But I want to get info on my new account.
What the problem?
I have been using below request to receive data from facebook api:
143357502355510/feed?fields=insights{name,title}&since=1474732800&until=1477324800&limit=100
but after version 2.6 has been deprecated and I changed sdk version to 2.7 this error is receiving:
"error": {
"message": "Invalid query",
"type": "OAuthException",
"code": 3001,
"error_subcode": 1504028,
"is_transient": false,
"error_user_title": "No Metric Specified",
"error_user_msg": "No metric was specified to be fetched. Please specify one or more metrics to be fetched and try again.",
"fbtrace_id": "XXXXXXXXXXX"
}
anyway to change the request and get the same data as before?
Found the answer here:
check this post
and I changed my request to:
143357502355510/feed?fields=insights.metric(post_impressions_unique,post_impressions){values,title}&since=1474732800&until=1477324800&limit=100
Can anyone please explain how to use the share api of linkedin after the changes been updated as per my understanding I have updated the code and i am getting the below response. I tried using the share.php from https://github.com/EJTH/SLinkedIn
{"access_token":"AQXklP-2r5D1JQf5m_PfOMQoDcT6MCjaTHhAhaMDAbPP3CtB4aWsWPdEr4xt9jtDsABykDHixcqyCdjPdpuqdcpIUTql_DG6MHXaTfdAK9P_8cpItmLI6y2T7hBT-bBv0g-z-0TvUivFjrAvN-m_L1iXz_O7PnJcE60Gd00G3_VTY-ex4Bs","expires_in":5173195}{ "errorCode": 0, "message": "Unknown authentication scheme", "requestId": "5NWY2NR7YZ", "status": 401, "timestamp": 1436186085958 }1
{"access_token":"AQXLJf6S8KuOqqnXTx4Ujt0lJuAX7ETe2nrPirdnjDhl8RrPqem9dFbxZZa-EV91_rfaGpXcrFwGRUGNJFmqHnDY_rYHrlala3QwRWtGY4K5Ij6dmjBHrwZyUhrFj_plFqiFE2h8QukOUD5GkJegQOyLWMcGjeQQ_26e3nssM1F7uNzH4i4","expires_in":5183999}{ "errorCode": 0, "message": "Empty oauth2_access_token", "requestId": "8UMZSHXY4C", "status": 401, "timestamp": 1436187852689 }
I am using instagram API(oauth) and I able to get the access token and user information using
https://api.instagram.com/oauth/authorize/client_id='.$client_id.'&redirect_uri='.$redirect_url .'&response_type=code'
and https://api.instagram.com/oauth/access_token by passing client id, secret and redirect_uri.
when I make the first call
(https://api.instagram.com/oauth/authorize/client_id='.$client_id.'&redirect_uri='.$redirect_url .'&response_type=code') it gives me the array of access_token and user.
My question is what should I do to get the followers of the user ?
I know I have to use https://api.instagram.com/v1/users/{user-id}/follows?access_token=ACCESS-TOKEN but for some reason I am getting the error message
{
"code": 400,
"error_type": "OAuthException",
"error_message": "Only response type \"code\" and \"token\" is allowed"
}
Please help!!!
Firstly, you don't need to be authenticated (i.e. need an access_token) to get a list of user followers. You just need your client_id.
The following request should work in your case:
https://api.instagram.com/v1/users/{user-id}/follows/?client_id={client_id}
As per new update you have to use access token instead of client_id
this is my response
{"data": {"id": "1829538552", "username": "mypageusername", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/11084945_1580533368872297_743341297_a.jpg", "full_name": "pagename Nation", "bio": "For Business/Ads\add#gmail.com\nKik: #test", "website": "https://carsmydrug.myshopify.com/", "counts": {"media": 371, "follows": 6464, "followed_by": 171599}}, "meta": {"code": 200}}
this is url to get above response
https://api.instagram.com/v1/users/1829538552/?access_token=1829538552.81758e8.5d303d9dd94543efb17684dee425cb5a
You have to get access token and you can only check follower list of user that accepted your of sandbox user
I am trying to get Google Play API subscription details using PHP and using following url to get purchase data :
https://www.googleapis.com/androidpublisher/v1/applications/[PACKAGE]/subscriptions/[SKU]/purchases/[PURCHASE_TOKEN]?access_token=[ACCESS_TOKEN]
I am getting the following error:
{
"error": {
"errors": [
{
"domain": "androidpublisher",
"reason": "developerDoesNotOwnApplication",
"message": "This developer account does not own the application."
}
],
"code": 401,
"message": "This developer account does not own the application."
}
}
Please help me sort out.
Just providing the URL does not help you get data of any application. How can you think so.? Isnt it insecure.? You have to get proper data by which you can at least prove ownership for the app..