LinkedinAPI: Get Phone Number from 1st Connection? - linkedin

I've tried
https://api.linkedin.com/v1/people/~/connections:(id,first-name,last-name,phone-numbers)
but it's only get (id,first-name,last-name)
even this:
http://api.linkedin.com/v1/people/id=UserId:(phone-numbers)
Does LinkedIn expose this field ? I've google it, but not found somewhere ..

Linkedin Not provide phone numbers of connections. They only provide basic profile of connections.
check here https://developer.linkedin.com/documents/connections-api

LinkedIn will provide the phone number if the user authorizes r_contactinfo
Sample Request URL:
https://api.linkedin.com/v1/people/~:(id,phone-numbers)?format=json
Sample JSON Response:
{
"id": "ye3i9-_24l",
"phoneNumbers": {
"_total": 1,
"values": [
{
"phoneNumber": "89xx189198",
"phoneType": "mobile"
}
]
}
}

LinkedIn not provide phone number. Check this document for accessible fields of profile
Basic Profile Fields

Related

ga4 measurement protocol new users 0

I have desktop app on Delphi. App send next data to https://www.google-analytics.com/mp/collect:
{
"app_instance_id": "47DA283039DE19AA64A5382C7936AE0F",
"events": [
{"name": "login", "params": {
"engagement_time_msec": "1",
"app_version": "3.5.37",
"client_id": "118"
}}
]
}
Google Analytics showing Active Users and Events. But New Users is 0. Also geolocation is no set.
I find answer, that needed pass a clint_id param ("client_id": "66676792622744477"), but after that GA cause an error:
{
"validationMessages": [ {
"description": "Unable to parse Measurement Protocol JSON payload. : invalid value oneof field 'AnonymousUserIdentifier' is already set. Cannot set 'client_id' for type oneof",
"validationCode": "VALUE_INVALID"
} ]
}
Help me please, whats wrong? How can I track New users and Geo via GA4 measurement protocol?
Try to send user_id information to GA4 Property: https://developers.google.com/analytics/devguides/collection/ga4/user-id?platform=websites

Fetch company posts from linkedin API

I am trying to fetch the posts of the company from the api, I have already applied to the marketing development platform and it was approved. I already got the token with the scope: r_organization_social and I'm calling the /shares api:
https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:organization:{company_ID}&sharesPerOwner=100&count=25&sharesPerOwner=10
But I'm getting the following response:
{
"paging": {
"start": 0,
"count": 25,
"links": [
{
"type": "application/json",
"rel": "next",
"href": "/v2/shares?count=25&owners=urn%3Ali%3Aorganization%3A{company_ID}&q=owners&sharesPerOwner=10&sharesPerOwner=100&start=0"
}
],
"total": 242
},
"elements": []
}
I tried to change the query params and it's still the same
This end-point worked for me:
https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List(urn%3Ali%3Aorganization%3A<ID_ORGANIZATION>)
See documentation: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api?tabs=http#sample-request-6
Disclaimer: I've no access to the linkedin API and couldn't test. But these are some things I noticed:
Your url contains two times the paramater sharesPerOwner, try removing one.
In the docs it's recommended to set the sharesPerOwner to 1000 and the count to 50. I'd also include the start paramater, just to make sure:
Maybe try something like this:
GET https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:organization:{id}&sharesPerOwner=1000&count=50&start=0
From the api-docs(https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api?tabs=http#find-shares-by-owner): "Note that the pagination excludes UGC and Direct Sponsored Content (DSC) posts". Make sure that the owner you are testing contains posts.
If this doesn't work. Could you provide some information on how you are sending the request? Have you tried accessing other parts of the api?

Can you delete the user identifier Client ID using User Deletion API?

We are currently not collecting User IDs and enabled the GA IP anonymization.
So how can we delete the user's identifier Client ID?
https://developers.google.com/analytics/devguides/config/userdeletion/v3/reference/userDeletion/userDeletionRequest#resource
By looking at the script it seems that it requires the User ID so i believe that if we don't store User ID in our GA system then there is no way of achieving it right?
The JSON object should change based on the type, you have 3 options:
So if you want to delete a Standar Web Property:
{
"kind": "analytics#userDeletionRequest",
"id": {
"type": "CLIENT_ID",
"userId": "188309123.12312312" // This is an example
},
"webPropertyId": "UA-XXXXX-X", // Property attacked
"deletionRequestTime": datetime
}
Greeting

Get unique device id for amazon echo

I am writing a custom skill for the amazon echo and I need to get a unique device id so I can register then product to my service. Everything I read says that you cannot get the id from the device. Has amazon changed this? Is there a work around to get a device id?
This week Amazon added the Device ID (unique) to the LaunchRequest JSON payload in Alexa Skills.
{
"session": {
"new": true,
"sessionId": "string",
"application": {
"applicationId": "string"
},
},
"context": {
"device": {
"deviceId": "string",
},
"request": {}
}
You can use the context->device->deviceId string to uniquely identify the device from which the request came.
Read more # https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interface-reference#request-body-syntax
There is no way to get a unique device ID. All you can do is get a unique User ID. There is no known workaround.
If you're looking for how to get Alexa Device ID?
Use the below snippet, It will work like a charm.
device_id = handler_input.request_envelope.context.system.device.device_id
I hope this helps you.

Triggering smart campaign and getting 603

I am trying to use Marketo smart campaign to send email data.
What I do is:
1) get or create Lead with addresse email
2) trigger smart campaign I've created with this lead_id and a couple of tokens I created on the folder containing the campaign.
That is, I am sending POST to https://.mktorest.com/rest/v1/campaigns/5826/trigger.json?access_token= with body
{
"input": {
"leads": [
{
"id": 2034349
}
],
"tokens": [
{
"name": "{{my.subject}}",
"value": "subj"
},
{
"name": "{{my.message}}",
"value": "the text"
}
]
}
}
And I get the response:
{u'errors': [{u'message': u'Access denied', u'code': u'603'}], u'requestId': u'c8f5#14c79fae723', u'success': False}
I was trying token names without "{{" and "}}", without "my." - the same result. The campaign exist and has this ID.
What's wrong here?
The role of the Marketo API user that you're using needs the "Execute Campaign" permission, and your current user is probably missing that permission. Unfortunately you can't edit the existing role. You'll need to create a new role, check that permission, and possibly also create a new API User.

Resources