I have a next issue using Linked In API V2:
curl -X GET --header 'Accet: application/json' --header 'Authorization: Bearer <my token>' 'https://api.linkedin.com/v2/adCreativesV2/62119114?projection=(variables(data(com.linkedin.ads.TextAdCreativeVariables(vectorImage~:privatePlayableStreams))))' | json_pp
{
"variables" : {
"data" : {
"com.linkedin.ads.TextAdCreativeVariables" : {
"vectorImage" : "urn:li:digitalmediaAsset:C560EAQFjbUgC1TlCcw",
"vectorImage!" : {
"message" : "URN Resolution failed for unknown reasons.: com.linkedin.restligateway.exceptions.GatewayAccessException: Not enough permissions to access: GET-playableStreams /assets/C560EAQFjbUgC1TlCcw/mediaArtifactPrivateUrls",
"status" : 500
}
}
}
}
}
My application have r_basicprofile, r_ad_campaigns permission scopes.
My user has 'account_manager' level access.
I'm not sure which permissions do I need to access vectorImage's Playable Streams?
Here in Asset Playable Streams Table section https://developer.linkedin.com/docs/ref/v2/digital-media-asset they write about authorizationMethod and my understanding is that only assets with authorizationMethod = PUBLIC are available to access, may be my problem is not in scopes?
I'll appreciate any information on this issue. Thanks!
Related
I'm trying the following request:
GET https://api.linkedin.com/v2/people/(id:urn:li:person:<person id>)?oauth2_access_token=<token>&projection=(results*(localizedFirstName,vanityName))
But I always get a:
{
"serviceErrorCode": 100,
"message": "Unpermitted fields present in RESOURCE_KEY: Data Processing Exception while processing fields [/memberId]",
"status": 403
}
If I try to do it using the alternative API:
GET https://api.linkedin.com/v2/people?ids=List((id:urn:li:person:<person id>))&oauth2_access_token=<token>&projection=(results*(localizedFirstName,vanityName))
An Internal Server Error is returned:
{
"message": "Internal Server Error",
"status": 500
}
I'm using Google Chrome to perform those requests.
I tried using Postman too.
Headers:
X-Restli-Protocol-Version: 2.0.0
Authorization: Bearer <token>
Got:
{
"serviceErrorCode": 0,
"message": "Syntax exception in path variables",
"status": 400
}
My app permissions are:
r_emailaddress
r_ads
w_organization_social
rw_ads
r_basicprofile
r_liteprofile
r_ads_reporting
r_organization_social
rw_organization_admin
w_member_social
I tried other APIs (socialActivity, ugcPosts) and everything looks fine.
I checked my API usages at https://www.linkedin.com/developers/apps/<id>/usage and people usage is currently 0%.
The tested user profiles are also public.
You should only use the id (instead of the urn). also the fields projection is wrong:
Use:
projection=(localizedFirstName,vanityName)
Instead of:
projection=(results*(localizedFirstName,vanityName))
As example:
curl -H "X-Restli-Protocol-Version: 2.0.0" \
"https://api.linkedin.com/v2/me?oauth2_access_token=<TOKEN>&projection=(id)"
Will return
{
"id": <ID>
}
and use it as:
curl -H "X-Restli-Protocol-Version: 2.0.0" \
"https://api.linkedin.com/v2/people/(id:<ID>)?oauth2_access_token=<TOKEN>&projection=(localizedFirstName,vanityName)"
So:
{
"vanityName": "<VANITY-NAME>",
"localizedFirstName": "<NAME>"
}
Hope this help
id parameter needs only person_id but you are providing urn.Try this https://api.linkedin.com/v2/people/(id:person_id) and don't forgot to include X-RestLi-Protocol-Version:2.0.0 in header while making call.
Trying to load sample data from Kibana using the tutorial : https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html but facing en error of "error" : {
"type" : "illegal_argument_exception",
"reason" : "mapper [geo.coordinates] of different type, current_type [geo_point], merged_type [ObjectMapper]"
curl -H "Content-Type: application/x-ndjson" -XPOST "https://Kibana_username:Kibana_password#cd90859873ee41f2ba44736569855ac6.us-central1.gcp.cloud.es.io:9243/_bulk?pretty" --data-binary #logs.jsonl
{
"index" : {
"_index" : "logstash-2015.05.20",
"_type" : "log",
"_id" : "VLO5SWsB2ropsYqSYd-A",
"status" : 400,
"error" : {
"type" : "illegal_argument_exception",
"reason" : "mapper [geo.coordinates] of different type, current_type [geo_point], merged_type [ObjectMapper]"
}
}
}
]
}
The error that you are getting is because, in your version of logs.json, the content looks like this: {"index":{"_index":"logstash-2015.05.18","_type":"log"}} but if you read the documentation:
Indices created in Elasticsearch 6.0.0 or later may only contain a single mapping type. Indices created in 5.x with multiple mapping types will continue to function as before in Elasticsearch 6.x. Types will be deprecated in APIs in Elasticsearch 7.0.0, and completely removed in 8.0.0.
So if you change the file content like this: {"index":{"_index":"logstash-2015.05.18"}}, it would work properly.
But in the latest update of this source file, this error is fixed.
I have some problem with the "Find Entities by URNs" API in order to retrieve the metadata and value information for a collection of URNs.
If I use the URL described in the doc (Sample request) with a valid access token:
https://api.linkedin.com/v2/adTargetingEntities?q=urns&urns=List(urn%3Ali%3AfieldOfStudy%3A100990,urn%3Ali%3Aorganization%3A1035,urn%3Ali%3Aseniority%3A9)&locale=(language:en,country:US)&oauth2_access_token=<a-valid-token>
I receive the message:
{
"serviceErrorCode": 0,
"message": "java.lang.ClassCastException",
"status": 500
}
Anyone have experience the same issue? Any idea how to fix it?
Also: how can i contact for technical support as in this case?
UPDATE:
I made some try and I fix using the following version:
https://api.linkedin.com/v2/adTargetingEntities?q=urns&urns=urn%3Ali%3AfieldOfStudy%3A100990&urns=urn%3Ali%3Aorganization%3A1035&urns=urn%3Ali%3Aseniority%3A9&locale.language=it&locale.country=IT&oauth2_access_token=<a-valid-token>
BUT the locale/language translation is not working. Could be this a working solutions?
From the support team:
Our docs are missing 1 critical piece of information. Whenever using
LIST and encoded URNs in the URL, we expect an additional header 'x-restli-protocol-version: 2.0.0'
The correct API call would be Request:
curl -X GET \
'https://api.linkedin.com/v2/adTargetingEntities?q=urns&urns=List(urn%3Ali%3Aindustry%3A1,urn%3Ali%3Aseniority%3A9)&locale=(language:it,country:IT)'
\
-H 'x-restli-protocol-version: 2.0.0' \
-H 'Authorization: Bearer <Token>'
Response:
{
"elements": [
{
"facetUrn": "urn:li:adTargetingFacet:industries",
"name": "Difesa e spazio",
"urn": "urn:li:industry:1"
},
{
"facetUrn": "urn:li:adTargetingFacet:seniorities",
"name": "Partner",
"urn": "urn:li:seniority:9"
}
],
"paging": {
"count": 2147483647,
"links": [],
"start": 0
}
}
Yes, it does provide a response in locale.
Hope this can help other guys in the future
Is there a way to check if a user has deploy permissions via the Artifactory REST API?
I am sending requests to the Artifactory server using cURL.
Yes, use the /api/storage/{repo-key}/{item}?permissions API. See the docs at https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-EffectiveItemPermissions
The docs explain the meaning of the permission chars.
GET /api/storage/libs-release-local/org/acme?permissions
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme"
"principals": {
"users" : {
"bob": ["r","w","m"],
"alice" : ["d","w","n", "r"]
},
"groups" : {
"dev-leads" : ["m","r","n"],
"readers" : ["r"]
}
}
}
in my new Company i had to debug an error with the Google Analytics Embed API.
Following i figured out:
We use following API: https://developers.google.com/analytics/devguides/reporting/embed/v1/getting-started
In the Backend we make a Request to the O-Auth Service with the JSON Crediential to use in the frontend the authentication Method: serverAuth.access_token instand of the key or clientId
In the Frontend it worked correctly with one Domain.
For the Request against: maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1s&callback=xdc._je5rc5&token=XXXXXX i got the Result:
/**/_xdc_._je5rc5 && _xdc_._je5rc5( [1,null,0] )
And the Second Request:
maps.googleapis.com/maps/api/js/GeocodeService.Search?4sLondon%20UK&7sUK&9sde-DE&callback=xdc._1aw0g9&token=XXXXX1
Return the Right Response: /**/_xdc_._1aw0g9 && _xdc_._1aw0g9( {
"results" : [
{/* Short Version */}
],
"status" : "OK"
}
)
But the same Requests on the same Server with another Domain got an error:
Request: maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1s&callback=xdc._bllk9e&token=XXXXXX
Response:
/**/_xdc_._bllk9e && _xdc_._bllk9e( [0,15,0] )
And the Second Request: maps.googleapis.com/maps/api/js/GeocodeService.Search?4sLondon%20UK&7sUK&9sde-DE&callback=xdc._1aw0g9&token=XXXXX
Response:
/**/_xdc_._1aw0g9 && _xdc_._1aw0g9( {
"error_message" : "Geocoding Service: This service requires an API key. For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key",
"results" : [],
"status" : "REQUEST_DENIED"
}
)
Maybe some one had an idea what i could do?