How to obtain a real Linkedin access_token?

The LinkedIn provider returns access_token key and secret. But the Linkedin api works with a single oauth access_token of about 500 characters long, which is used like this:

```
GET /v1/people/~ HTTP/1.1
Host: api.linkedin.com
Connection: Keep-Alive
Authorization: Bearer AQXdSP_W41_UPs5ioT_t8HESyODB4FqbkJ8LrV_5mff4gPODzOYR
```

There's no mention in the LinkedIn api docs about a key and secret as returned by oneall provider api.
So how to use the value returned by Oneall? Or, how to get a real access_token from Oneall?

thanks

Answers

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    edited January 2018
    Hello,

    the Authorization: Bearer is used only used to retrieve the user's profile after his connection with LinkedIn.
    As it's only used once and as OneAll takes care of that step, there is no need to keep it.

    The access token is available in the access_token node in the data returned by our API:

    "access_token": { "key": "aaaaaaaa-bbbb-cccc-aaaa-bbbbbbbbbbbb", "secret": "xxxxxxxx-yyyy-zzzzz-aaaa-bbbbbbbbbbb", "date_expiration": "03/04/2018 10:13:05" }
  • No you are wrong, the Authorization: Bearer is used for each linkedin API call.
    The tokens that you provide are not valid.

    I understand that they are not needed when using OneAll, but OneAll's LinkedIn functionality is very limited. So if you want to use the native LinkedIn Api that access_token that you provide can't be used.

    Note that for Twitter and Facebook, the access_tokens that you provide can be used. So I don't understand why you can't provide the access_token for LinkedIn?

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.