#linkedin Linkedin API dateRange parameter - linkedin

I am trying to make a request to get a Linkedin Ads report but I have problems with the dateRange parameter, I have tried how it is in the documentation and other formats that I have seen in examples, in postman and on this page but none of them have worked for me. I am trying it with Insomnia before doing it with the python code. I hope you can help me, thank you very much.
This is the URL I am trying:
https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&timeGranularity=DAILY&pivot=CAMPAIGN&dateRange.start.day=1&dateRange.start.month=5&dateRange.start.year=2022
Another format:
https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&dateRange=(start:1,month:5,year:2022)&timeGranularity=DAILY&pivot=CAMPAIGN

Related

Send Emoticons over LinkedIn share API

I've tried to post utf8mb4 chars - like 🌸 - via share API to LinkedIn. But I always get 'illegal characters in XML' as response. Already tried to 'escape' it with CDATA, but it doesn't help.
When posting those chars in LinkedIn directly, it works. :-/
Any idea? Posting without those chars works without problems.
For me, posting utf8mb4 characters (like 😁) works fine if you use the json endpoint/format.
However, if you're posting XML, you need to convert them to their html entity values (e.g. 😁)... then it'll work.
Currently, LinkedIn only supports the url parameter in its share URL. So, you'll only be able to have a share button that shares a URL, not text. Like this..
https://www.linkedin.com/sharing/share-offsite/?url={url}
Source: Microsoft LinkedIn Share URL Documentation.
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check us out! Social Share URLs

How to make POST request using OAuth via Youtube API?

I am trying to get this thing to work for a couple days since it's my first time working with the OAuth system without any luck.
I have been experimenting here: https://developers.google.com/youtube/v3/docs/subscriptions/insert#try-it
With the following settings:
http://i.gyazo.com/5cd28f1194d5dfebee25d07bc0db965e.png
When I execute the code it successfully subscribes to the specified channelIdaccount with the authorized account.
I have tried to copy paste the shown POST URL into my browser without any luck. The plan was just to test it as I would like to implement this in PHP.
Now to my questions:
The {YOUR_API_KEY}, is this where I am supposed to type in the access token? If so, do I need the &mine=true tag at all?
I just realized that there are no ID's in the URL but there is an JSON-object in the request box example. Am I supposed to convert a string to JSON-object and pass it to the $fields= tag?

Need help to build http request for yoututbe video upload

Let me mention it first that I am a learner at building HTTP Requests. I am trying to examine HTTP traffic and how it works. I had some luck with loging in successfully by getting the values of various tokens from the page and passing them as parameters :
GALX, dsh, and bgresponse
to :
https://accounts.google.com/ServiceLoginAuth
with parameters:
continue=$continue&service=youtube&dsh=$dsh&hl=en_US&GALX=$GALX&pstMsg=1&dnConn=&checkConnection=youtube:1000:1&checkedDomains=youtube&timeStmp=&secTok=&_utf8=$_utf8&bgresponse=$bgresponse&Email=$Email&Passwd=$Password&signIn=Sign in&PersistentCookie=yes&rmShown=1
Now I am stuck at trying to build the HTTP Request to upload a video to Youtube. Apart from the video file what parameters do I need to pass to upload a video to Youtube?
Can anyone please help me build the HTTP Request?
Any help will be highly appreciated.
Thanks in advance.
Praney
I would recommend to use Google's Resumable Upload guide. It shows the HTTP requests you need, with a simple example. It was enough for me to get it working, but since Friday evening I am encountering a "503 : Service Unavailable" error, which should mean the Youtube API service is having some issues (although it might be because I did something wrong).

Link to add ics to Google Calendar stopped working

I have a link on a website to let users add an ICS feed to their google Calendar. Using this code:
http://www.google.com/calendar/render?cid=https://<etc>
It worked for 3-4 years but not anymore. The message Google sends me is:
This email address isn't associated with an active Google Calendar account: https://<etc>
If I enter the ics feed manually things work ok: the feed is parsed as should. No errors.
Any idea where to look to fix this?
I too have this problem. Did you solve it?
My tests show that it works when using URLs with http, like:
www.google.com/calendar/render?cid=http%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
But not with https, like:
www.google.com/calendar/render?cid=https%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
My workaround for this is to use http in the link, but redirect it to https in the web server. Not very elegant, but it works. The GET won't be encrypted, but at least the answer is.
EDIT: Actually, it can be a huge security risk sending the GET over http instead of https if you don't do any more authentication than via query string parameters, which can be hard for calendar feeds. Anyone who can sniff the GET can send the same request over https themselves.
Right now it works, even with https.
https://www.google.com/calendar/render?cid=https%3A%2F%2Fwww.example.com%2FCalendar%2FPublic%20Events.ics
Use webcal protocol for the calendar address:
https://www.google.com/calendar/render?cid=webcal%3A%2F%2Fwww.example.com%2FCalendar%2FPublic%20Events.ics
Ok, so for me, none of the other answers on this page worked. But I figured it out with bits and pieces of others:
Link to my calendar's ics:
https://example.com/calendar?id=a304036ea5a474ee5d80a100d79c231c
The right way to link it to Google Calendar:
https://calendar.google.com/calendar/r?cid=webcal%3A%2F%2Fexample.com%2Fcalendar%3Fid%3Da304036ea5a474ee5d80a100d79c231c
The key here is adding it using the webcal protocol instead of the https protocol.
Hope this helps anyone.
They got more strict.
Now you have to use
http://www.google.com/calendar/render?cid=http%3A%2F%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
note the encoding.

Google Places API - REQUEST_DENIED

What this is NOT
a) a "sensor=true_or_false" issue
b) a key is wrong issue (unless the key I got has limitations)
c) too many requests (since I only make one request)
d) cross domain (since I load the url from the browser location bar)
What I did
Signed up http://code.google.com/apis/maps/signup.html
Tried the example on that page in the location bar (I know about cross domain from script)
works fine
Read the documentation
Pasted their example exchanging their key for mine
returns
{
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
}
So far all entries failed due to wrong key or sensor=true_or_false
And for example the url in this one Google Places API jQuery.ajax() request fails with working URL
also gives me error when pasted into the browser.
What did I miss?
UPDATE
So I went to get some keys
Key for browser apps (with referers)
API key:
AIzaSyCStj9m5LNTu9mCf6cQGDVAFKZC7Y?????
Referers:
Any referer allowed
Activated on: Jan 30, 2012 1:03 PM
Activated by: me
and tried again. Still does not work.
This is actually (b): wrong key. Actually, you're using the wrong kind of key (from Sign Up for the Google Maps API which is only good for the JavaScript V2 API).
Please see Obtaining an API Key for how to get a new API key, of the new kind.
Edit: At the time this question arose, valid API keys that worked on Geocoding API did not work on Places API, but now seem to work fine. Looks like some issue on Google side.
I just got a REQUEST_DENIED response when making an autocomplete request in a Ruby app. It turned out that I had not specifically switched on the Places API in my google api console.
Go to: https://console.developers.google.com and login.
In the left menu go to "APIs & auth" -> "APIs"
Then find the "Places API" option and click on the status to the right to toggle it to "on"
This fixed the problem immediately for me.
Ohkay this worked for me and i know it will work as we are making the same mistake.
First go to API's and enable the google places api for web.
After that, go to credentials and in the credentials where your key is showing, click on it.
After clicking, in the restrictions tab, choose what will be the API will be doing.
Set that up, restart your script and voila... it will be done.
I faced the same issue. But was able to resolve it after enabling the Places API from Google console. I used the 'server' key to make a call from application. Hope this helps for others looking for solution.
This issue has been discussed on many threads here... but the bottom line is you should check your code to see if u are sending out too many requests at a time to the google API.
You are only allowed to send 1 request per 1 minute.
MKErrorDomain error 4 iPhone

Resources