Showing posts with label REST. Show all posts
Showing posts with label REST. Show all posts

Friday, October 08, 2021

[LinkedIn API] Accessing the LinkedIn API ... or not

Wow, "Saturday, July 20, 2019" was a while ago. Nevertheless, here we are again writing about code.

I'm trying, totally unsuccessfully at this point, to talk to the LinkedIn API. There's copious documentation but something isn't connecting up in my mind and I'm having an IJDGI (I just don't get it) moment.

I've followed the process listed at https://docs.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=linkedin/compliance/context insofar as I have created an app and had it verified.

At the moment I'm in Visual Studio Code (VSC) and using the RestClient tool to do two-legged OAuth:

POST /oauth/v2/accessToken HTTP/1.1
Host: www.linkedin.com
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id=xxxxxxxxxx&client_secret=zyxwvutsrqponm

(client_id and client_secret obfuscated)

The rather long-winded response I'm getting from that request ends with
{ "error": "access_denied", "error_description": "This application is not allowed to create application tokens" }

LATER

This project may well come under what LinkedIn calls an "Unapproved Use Case" as their site says,
Unapproved Use Cases
Additional use cases we do not permit:

No Social Feeds: Under our MDP Terms, none of the data provided via our 
Page Management APIs can be used in a social feed use case (e.g. to display 
a feed of LinkedIn company updates on the company’s website or intranet).

Hmm... 

I've also asked for help on Reddit, DEV and StackOverflow. I expect they'll tell me it's unapproved.

Wednesday, June 20, 2012

[Go] Out with JScript, in with Go?

Today I ran a large JScript against a month's worth of hourly REST traffic logs. The logs were parsed and manipulated into a series of tables in an Access database. It took about 12† hours to run. 12 hours ... and on a decently-specced laptop -- a Toshiba Satellite Pro L670.

So I'm looking around for something as flexible as JScript/javascript but which produces native binaries ... and Go seems like a good possibility. Any other suggestions?




† I know, I did say 24 hours initially. Frightening the effect of 4 hours sleep on the middle-aged mind.

© Copyright Bruce M. Axtens, 2012