I am currently working on an app that allows users to sign in through LinkedIn. I would like to get the user's email and am currently testing it through terminal using curl first. From LinkedIn's API documentation I am aware that I need to GET from this url:
https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))
to get the email of a user. I have already requested permission from my user for retrieving their email address. The curl command I run is as follows:
curl https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~)) -H "Authorization: Bearer access_token"
where access_token in reality is the actual access token. However every time I run this on terminal I always get this response:
[1] 31166
zsh: no matches found: https://api.linkedin.com/v2/emailAddress?q=members
zsh: unknown file attribute: h
[1] + exit 1 curl https://api.linkedin.com/v2/emailAddress?q=members
This is odd considering that my request to:
https://api.linkedin.com/v2/me
works perfectly fine. Does anyone know what might be a potential cause of this?