Tuesday 20 September 2016

SilverPop Integration - ASP.NET - SilverPOP- Logout process

Read before this SliverPop login process

User Logout

As the name is self explainatory, this interface does the work of logging out the user from the Silverpop, closing and invalidate the session established.

If Silverpop successfully logs out the user then it will return SUCCESS=true.

/// <summary>
/// Logout API used for closing the established session with Silverpop.
/// </summary>
/// <param name="sessionId">Session id.</param>
private bool Logout(string sessionId)
{

if (string.IsNullOrEmpty(sessionId))
{
throw new Exception("Provided session id is null or empty.");
}
else
{

EngageSoapApiClientService_InterfaceClient engage = new EngageSoapApiClientService_InterfaceClient();

sessionheadertype sessionHeader = new sessionheadertype(); LogoutRequestType logoutRequest = new LogoutRequestType(); SessionMgmtResponseType sessionMgmtResponse = new SessionMgmtResponseType(); sessionHeader.sessionid = sessionId;

sessionMgmtResponse = engage.Logout(sessionHeader, logoutRequest); return sessionMgmtResponse.SUCCESS;

}

}


No comments:

Post a Comment