{"id":29248655,"url":"https://github.com/rstudio-tech/linkedin-api","last_synced_at":"2025-07-04T00:08:24.405Z","repository":{"id":302494983,"uuid":"901220056","full_name":"rstudio-tech/Linkedin-API","owner":"rstudio-tech","description":"Go-Linkedin API","archived":false,"fork":false,"pushed_at":"2024-12-10T09:03:59.000Z","size":1741,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T17:55:28.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rstudio-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-10T09:02:46.000Z","updated_at":"2025-02-21T15:59:56.000Z","dependencies_parsed_at":"2025-07-02T17:55:30.993Z","dependency_job_id":"19fb339d-d559-4c41-aed1-fe1b83e0b9a0","html_url":"https://github.com/rstudio-tech/Linkedin-API","commit_stats":null,"previous_names":["rstudio-tech/linkedin-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rstudio-tech/Linkedin-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio-tech%2FLinkedin-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio-tech%2FLinkedin-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio-tech%2FLinkedin-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio-tech%2FLinkedin-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstudio-tech","download_url":"https://codeload.github.com/rstudio-tech/Linkedin-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio-tech%2FLinkedin-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263421931,"owners_count":23464051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-04T00:08:23.723Z","updated_at":"2025-07-04T00:08:24.357Z","avatar_url":"https://github.com/rstudio-tech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linkedin-api [![GoDoc](https://godoc.org/github.com/johnaoss/linkedin-api?status.svg)](https://pkg.go.dev/github.com/johnaoss/linkedin-api)\n\n## *NOTE*: \n\n**This package is for the V1 API which has been deprecated and is pending removal. I don't currently have any plans on supporting V2, although that may change in the future. Any V2 support would be a major breaking change, and as such the state of the API would be subject to massive change, as well as dropping V1 support.**\n\nThis project functions as a pure Go interface for Linkedin's v1 REST API. Currently, this provides a lightweight, documented interface to get a user's posts \u0026 profile data into a native marshallable Go struct. Requests are made secure by using OAuth2.0 authenticated requests to LinkedIn's servers.\n\nThis was my first project written in Go, and so I'd love to hear your thoughts!\n\nThis currently only supports GET requests. \n\n## Installation\n\n```bash\ngo get -t github.com/johnaoss/linkedin-api\n```\n\nThat's it!\n\n## Examples\n\nI haven't tested this with other routing packages, but this does indeed work for any program using gorilla/mux for routing purposes.\n\n### Setting up the configurations\n\n```go\n\nimport api \"github.com/johnaoss/linkedin-api\"\n\nfunc main() {\n    permissions := []string{\"r_basicprofile\"}\n    clientID := \"myID\"\n    clientSecret := \"hush\"\n    redirectURL := \"https://example.com/totallyvalidauth\"\n    api.InitConfig(permissions, clientID, clientSecret, redirectURL)\n}\n\n```\n\n### Getting a user's login url (includes state)\n\n```go\nimport api \"github.com/johnaoss/linkedin-api\"\n\nfunc loginHandler(w http.ResponseWriter, r *http.Request) {\n    login := api.GetLoginURL(w,r)\n    html := \"Your login is \u003ca href=\\\"\" + login + \"\\\"\u003eLogin here!\u003c/a\u003e\"\n    w.Write([]byte(html))\n}\n```\n\n### Getting a user's data\n\n```go\nimport api \"github.com/johnaoss/linkedin-api\"\n\n// this handles the authorized redirect URL as specified in the Linkedin developer console\nfunc authHandler(w http.ResponseWriter, r *http.Request) {\n    userData := api.GetProfileData(w,r)\n    html := \"Your name is is \" userData.FirstName + \" \" + userData.LastName\n    w.Write([]byte(html))\n}\n```\n\n### Sharing a comment (UNTESTED)\n\n```go\nimport api \"github.com/johnaoss/linkedin-api\"\n\nfunc sharePost(w http.ResponseWriter, r *http.Request) {\n    vis := VisibilityStruct{Code: \"anyone\"}\n    post := \u0026api.Post{Visibility: vis, Comment: \"This is a comment\"}\n    resp, err := api.SharePost(post,w,r)\n    if err != nil {\n        w.Write([]byte(\"Something went wrong!\"))\n    } else {\n        w.Write([]byte(\"Your post was successfully shared!\"))\n    }\n}\n```\n\n## Limitations\n\nThis currently services only the non-partnered content as LinkedIn does not have any means of open-source developers to reliably acquire this data. Aside from that, if there are any bugs please feel free to get in touch with either an issue or an e-mail!\n\n# License\n\nMIT Licensed, check the LICENSE.md file for more details. \n\n## TODO\n\n1. Proper testing of functions that require a router.\n1. POST features\n1. Full Linkedin Partner features (if possible)\n1. More info on `current-share`\n1. Clean up this code (was my first Go project after all)\n1. Work on v2 of this project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio-tech%2Flinkedin-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstudio-tech%2Flinkedin-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio-tech%2Flinkedin-api/lists"}