I've been struggling with the following basic call to the linkedIn API.
I have received the 'OAuth 2.0 access token' through linkedIn's 'OAuth Token Tools' page and given it the proper scope (r_basicprofile) in order to complete the call. But when the call is made I get error {"serviceErrorCode":65604,"message":"Empty oauth2 access token","status":401} even though I have passed the token properly (see code below).
Any help would be greatly appreciated
import requests
import json
access_token = 'Not displayed for obvious reasons'
headers = {'Authorization': f'Bearer {access_token}'}
me = requests.get('https://api.linkedin.com/v2/me',headers=headers).json()