Access token moved

lock
push_pin
done
Answered
1

Before I could do something like this:

var accessSecurityToken = new SoAccessTokenSecurityToken(CurrentLogin.AccessToken);
session = SoSession.Authenticate(accessSecurityToken);

But in the latest NuGet packages (from 10.1.5 and up) the access token must have moved (see also https://community.superoffice.com/en/technical/forums/general-forums/announcements/superofficewebapi-package-breaking-changes/)

and I think this is right, but there is no overload for SoSession.Authenticate() with a AuthorizationAccessToken as parameter.

var authToken = new SuperOffice.WebApi.AuthorizationAccessToken(CurrentLogin.AccessToken);
session = SoSession.Authenticate(authToken);

Could someone point me in the right direction or give a link to an example, on how to get a session from the new autorization access token?

Thank you in advance!

 

 

27 Sep 2022 | 09:15 AM

All Replies (1)

Hi Martin,

Either use SuperOffice.NetServer.Services or SuperOffice.WebApi (with the appropriate Authorization package). They are both Agent API Clients, and you would only want to use one or the other - not both.

SuperOffice.WebApi uses RESTful APIs. (Examples)

SuperOffice.NetServer.Services uses SOAP APIs. (Examples (legacy))

 Hope this helps.

27 Sep 2022 | 11:54 AM

Add reply