How to create a LinkedIn API application for the WP-LinkedIn plugin

ATTENTION: following breaking changes in the LinkedIn API this plugin won’t be functional anymore after March 1st, 2019. More information here.

Here’s the step by step instructions on how to create a LinkedIn API application to be used with the WP-LinkedIn plugin. I will try to keep it as accurate as possible but if you notice any discrepancy or have questions then don’t hesitate to post a comment.

echo adrotate_group(4);

  1. Go to the LinkedIn Developer Network
  2. Click on the big yellow “Create Application” button
    Create application - Page 1
  3. Fill in all the fields in the next form. You will probably need to create a new company. You will need an application logo url using HTTPS (you can use your Twitter profile picture url or a public image on Flickr or Facebook) check the “terms” check box and click the “Submit” button
    Create application - Page 2
  4. On the next form you will have to add the OAuth 2.0 authorized redirect url which is given to you on the settings page of the plugin (something like http://yourdomain.com/oauth/linkedin/). You must give the exact url, including the trailing slash if there is one. Paste it in the field then click on the yellow “Add” button. Click the “Update” button.
    Create application - Page 3
  5. Finally copy the authentication keys (“Client ID” and “Client Secret”) and copy them in the corresponding fields on the plugin’s settings page and click on the “Save Changes” button.
  6. Once the settings have been saved you will notice an error message that says that your authentication token is expired or invalid (you don’t have one yet, so it’s definitely invalid). Click the link in the message and you will be taken to LinkedIn. They will ask you to login (unless you’re already logged in) and then will ask you to authorize the application to have access to your profile. Once you authorize the application you will be redirected to your website.

Image Credits: Jerry Luk

66 thoughts on “How to create a LinkedIn API application for the WP-LinkedIn plugin

  1. JONATAS

    Salve,
    quando arrivo ad eseguire l’ultimo punto della creazione LinkedIn API application per il WP-LinkedIn plugin; ossia quando clicco al messaggio del TOKEN il link apre questa paggina di errore: Not Found

    The requested URL /oauth/linkedin/ was not found on this server.

    Apache/2.2.22 (Debian) Server at vedani.net Port 80

    Reply
    1. Claude Vedovini Post author

      I can’t speak Italian but I guess you have a problem with the redirect url.
      Try to go to the permalinks settings page and save it once, then retry to get the oauth token

      Reply
  2. Scott

    Hi Clause. I thought I had followed all of your instructions correctly, hwoever I get this error message when i hit the link for the new access token:

    An error has occured while updating the access token, please try again.
    Error message: Your application has not been authorized for the scope \\\”r_fullprofile\\\” (invalid_scope)

    Reply
      1. Pedro

        Hi Claude,
        I got the exact same error . I followed your instruction but it still did not work and the error persists.
        Do you have any other suggestion?

        Thank you

        Reply
  3. Bob Lei

    Hi there Claude,

    Thanks for your guide. I’ve followed your steps but I get this message: https://www.dropbox.com/s/gvvsclyho4h3os4/Schermafdruk{5f676304cfd4ae2259631a2f5a3ea815e87ae216a7b910a3d060a7b08502a4b2}202016-03-06{5f676304cfd4ae2259631a2f5a3ea815e87ae216a7b910a3d060a7b08502a4b2}2023.10.14.png?dl=0

    If for some reason you don’t want to click that url it’s a message stating Bad redirect and “invalid redirect_uri. This value must match a URL registered with the API Key.”

    Please help.

    Thanks!

    Regards, Bob

    Reply
          1. Claude Vedovini Post author

            I don’t know any other plugin that would replace this one and I don’t use any LinkedIn plugin on my own website. I actually deleted my LinkedIn account a while ago.

  4. Edwin

    Hello Claude,

    When I try to activate I get the following page:
    “Not Found
    The requested URL /oauth/linkedin/ was not found on this server.
    Apache/2.4.7 (Ubuntu) Server at proxy.scordeiro.net Port 80”

    I tried to go to permalink page and save, but it made no change.

    I tried to create the folders in the /var/www/html/ but it didn’t work too.

    Thanks,
    Edwin

    Reply
  5. Edwin

    I was using proxy.scordeiro.net for testing purposes. I have just repeated the process and now it works. Thanks

    Reply
  6. Jeffrey

    Hello Claude,

    I hope you can answer my question.
    For a school project i need some sort of linkedin integration within a CMS system (wordpress in this case).

    I installed your plugin and created a linkedin key and secret key.
    Than i used the redirect URL (given by your plugin) and added it in the redirect field at linkedin/developers and it was accepted.

    until here everything is working.

    The last step is to get a token, but when i click on the link (given by the alert in wordpress) to activate a new one; it sends me to 404 page. I didnt create the folders/files where the token-link sends me to.
    Is this necessary?

    my website URL is: http://www.pict3poc.tk/
    my redirect URL is: http://www.pict3poc.tk/oauth/linkedin/

    Did i something wrong?

    Thanks in advance for helping

    Reply
      1. Jeffrey

        Hi Claude,

        First of all, thanks for you quick reaction.

        I did as you said, on the permalinks page, the last one is activated, custom structure (by default)
        with a URL next to it.

        I saved the permalinks page and tried to get a token.
        Now the linkedin login screen shows up, as i fill in my credentials and press login its still sends me to a 404 error page.

        Is there anything else i can do?
        Thank you

        Jeffrey

        Reply
        1. Jeffrey

          Never mind, I played with the permalink options a little bit and changed the permalink to the first availible option (plain).
          Now it works!

          Thank you for your help

          Reply
  7. Golam Rabbani

    Hi, I successfully completed all the steps. I want to show my linkenin recommendations by this shortcode [li_recommendations width=”480″ length=”200″ interval=”1000″] I used it into my page but it didn’t work. But when I used [li_profile] to show my profile, it’s working. But I don’t want to show my profile. I want to show my recommendations as rotating scrolled.

    Please give me suggestion. Or did i do anything wrong?

    Reply
  8. Paul

    Hello Claude.
    I get the following error message:

    An error has occured while updating the access token, please try again.
    Error message: The client_id 773rw8oucewcy8 is disabled. (disabled_client)

    And when I use the link at the top of the WordPress admin pages, to Authorise access. the Above the Authorisation window, it says “Client is disabled” . So, authorising with my username and password doesn’t change anything.

    Reply
      1. Paul

        It worked! Thank you.
        Thought I’d already done that a few times. All good now.
        I see the “recommendations” data isn’t displaying for me.
        Also, is there a way to display a bit more of a LInkedIn look and feel to the Widget display?
        Thanks.

        Reply
  9. Ferdie Serrao

    Hello Claude!, Ive just installed the plugin, got the client id and client secret, redirect url is the same as on the linkedin plugin redirect url, when it says “Your LinkedIn access token is invalid or has expired, please click here to get a new one.” i do that then i get the error message “Error message: Your application has not been authorized for the scope \\\”r_fullprofile\\\” (invalid_scope)” How do i go further from here??? Any help?

    Reply
  10. Deepika

    Hey Claude,

    I am getting 404 error while activating the access token. I have created virtual host in wamp.
    Also also tried to go to the permalinks settings page and save it.
    please help

    Reply
  11. Dheeraj Shetty

    Hi Claude I get the following error message after allowing access to my site

    An error has occured while updating the access token, please try again.
    Error message: missing required parameters, includes an invalid parameter value, parameter more than once. : Unable to retrieve access token : appId or redirect uri does not match authorization code or authorization code expired (invalid_request)

    My site address is http://dheerajshetty.in
    WordPress Address (URL) http://blog-dheerajshetty.rhcloud.com

    Reply
    1. Claude Vedovini Post author

      usually it’s because the redirect_uri you registered is wrong or you have the incorrect settings for “home url” in the WordPress general settings

      Reply
  12. Mary Zimnik

    Claude, does this not work if still in development working on a testing server? I’ve had success with all your instructions (even requested another token just to be sure), but the stream of recommendations are not there. Thanks, Mary

    Reply
    1. Claude Vedovini Post author

      You have only access to the recommendations if you are a LinkedIn partner and they granted you access to the full profile. Once that the case you’ll need to check the “Full Profile” box in the option and request a new token.

      Reply
      1. Mary Zimnik

        I see. I did, yesterday, send a request/application for that, but I see you have doubts they will do that? I will cross my fingers and wait and see if they approve me for that. Thanks for your quick answer, Claude.

        Reply
  13. Naz

    Hi Claude! I have the problem with wp-linkedin plugin. I have added this plugin, activated it, set api and secret keys. Created new page where placed shortcodes and new page with url as redirect url. But I cant see some changes( it doesnt works for me.

    Reply
    1. Claude Vedovini Post author

      the plugin keeps a cache of the LinkedIn data, if you change your LinkedIn profile and wants it to be immediately updated on your site you need to empty the cache using the button on the “Tools” page of the plugin’s option page.

      Reply
  14. Pieter Reintjes

    Hello Claude,
    For a client I am trying to have linked in on a page.
    I have the problem with the redirect_uri (does not match the registered value).
    I have read a lot of posts about this, here and in wp-org.

    I tried the perma settings.
    I tried the slash, with, without.
    I tried the ?oath=linkedin and just the website name.
    I tried the tip with the cache, empty cache.
    I tried a lot… But I still get the error message.
    What else can I do?

    Reply
    1. Claude Vedovini Post author

      Check the values you have in the General Settings page of WordPress for “Site Address” and “WordPress Address”. You can see what redirect_uri the plugin is sending to LinkedIn in the url that is on the “Regenerate Token” button on the Tools tab

      Reply
      1. Mike Ratel

        Am I correct that “Site Address” and “WordPress Address” in most cases will be the same? In my case I have them both set to ratelnet.me. I don’t see a field where I can enter a redirect_uri in the General Settings.

        Reply
  15. Paula Baker-Parkin

    Hi Claude,

    I have installed and set up, but when creating the token I get:

    “Error message: A required parameter \”client_id\” is missing (invalid_request)”

    I have the correct Client ID in the system…

    Reply
  16. Lendon

    Hey Claude,

    I’m wanting to purchase the company add-on, but I need to make sure I can get the base plugin to work first. Whenever I click on “Your LinkedIn access token is invalid or has expired, please click here to get a new one.” It take me to confirm my profile, but once I do that I am getting a “HTTP ERROR 414”
    Please advise at your earliest convenience.

    Reply
  17. sunny

    Hello I am trying to install for my client but same issue about ” Your LinkedIn access token is invalid or has expired, please click here to get a new one.” after clicking on save again it is same issue also as mentioned in about comments / threads i went to permalinks and saved permalinks and again i came back on the settings page of linkedin in wordpress still issue is same.

    my redirect URL – https://natashamarchewka.com/oauth/linkedin/
    and followed the instruction while creating the APP too.

    please help

    thanks
    sunny

    Reply
  18. DESGREES Catherine

    Hi Claude, we installed for our company WPL and it works well. We want to add fields from LinkedIn basic profile (fields allowed by LinkedIn such as “summary”. Cf. https://developer.linkedin.com/docs/fields/basic-profile). Could you help use to do the right things because these fields do not appear to “Fields map” check boxes? Many thanks. Catherine

    Reply
      1. DESGREES Catherine

        Dear Claude, thank you for your answer. I can confirm you that we are using your plugin. Could you precise me which are the LK’s fields that we can map and could we add some?

        Reply
        1. Claude Vedovini Post author

          I am sorry but WPL is not my plugin and furthermore there is no “fields map” or “LK’s fields” in my plugin. Also, in my plugin, the “summary” field is one of the fields that are retrieved by default when showing a profile, so you shouldn’t have any problem with it. If really there is some kind of misunderstanding and you are actually using the WP-LinkedIn plugin then this article should help: https://vedovini.net/2013/06/29/showing-more-of-your-linkedin-profile-with-wp-linkedin/

          Reply
  19. Rickard Hansveden

    Hi,

    I have problems with Company ID´s. I ID is not displayed in the plugin settings.
    It says this: “This resource is no longer available under v1 APIs”

    Do you know what’s wrong?

    Reply
  20. H

    I’m getting “Mensaje de error: Scope “r_basicprofile” is not authorized for your application (unauthorized_scope_error) error.

    Perhaps is a variable name error, as LinkedIn granted “r_liteprofile
    3-legged member permission”

    Could you check, please?

    At leas an update in order to remove all the options not available anymore in your plugin :), to minimize security issues.

    Thanks in advance!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.