Skip to content

Commit

Permalink
Updated to use Linkedin's userinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisamiga committed Dec 11, 2023
1 parent f7f98d9 commit f6e9cd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const embedImage = core.getInput("embed_image");
function getLinkedinId(accessToken) {
return new Promise((resolve, reject) => {
const hostname = "api.linkedin.com";
const path = "/v2/me";
const path = "/v2/userinfo";
const method = "GET";
const headers = {
Authorization: "Bearer " + accessToken,
Expand All @@ -23,7 +23,7 @@ function getLinkedinId(accessToken) {
const body = "";
_request(method, hostname, path, headers, body)
.then((r) => {
resolve(JSON.parse(r.body).id);
resolve(JSON.parse(r.body).sub);
})
.catch((e) => reject(e));
});
Expand Down

0 comments on commit f6e9cd6

Please sign in to comment.