SparkleNetworks / LinkedInNET

Sparkle.LinkedInNET will help you query the LinkedIn API with C# :)
https://www.nuget.org/packages/Sparkle.LinkedInNET/
GNU Lesser General Public License v3.0
35 stars 51 forks source link

GetAccessToken - System.InvalidOperationException: "Failed to read API response" #28

Closed DanNetor closed 2 years ago

DanNetor commented 2 years ago

Hi everybody,

I'm trying to get an access token using the GetAccessToken function. I keep getting the error XmlException: Unexpected character '<'. Can someone help me?

Best, Daniel


System.InvalidOperationException HResult=0x80131509 Nachricht = Failed to read API response Quelle = Sparkle.LinkedInNET Stapelüberwachung: bei Sparkle.LinkedInNET.OAuth2.OAuth2Api.GetAccessToken(String authorizationCode, String redirectUri) bei LinkedInWebScrapper.WebForm1.Page_Load(Object sender, EventArgs e) in C:\VS_Local\LinkedInScrapper\LinkedInWebScrapper\WebForm1.aspx.vb: Zeile13

Innere Ausnahme 1: SerializationException: Fehler beim Deserialisieren des Objekts "vom Typ Sparkle.LinkedInNET.OAuth2.OAuth2Error". Unerwartetes Zeichen '<'.

Innere Ausnahme 2: XmlException: Unerwartetes Zeichen '<'.

sandrock commented 2 years ago

As stated in the README, this library cannot evolve to support the new LinkedIn API.

As stated in the README, there are a few forks with live contributions.

Please consider using this fork.

Or do you confirm that you need support for this old library?

DanNetor commented 2 years ago

Hi @sandrock,

thanks for that information. I wasn‘t confident with V1 and V2 so i couldn‘t see the diffent. But now its clear to me. I will use the suggested fork.

best Daniel