checkSession method

Future checkSession (
  1. String token

Checks if the token provided is still valid and matches with the server. @param token The session token, which you got, when the user has been authorized.


dynamic checkSession(String token) async {
  if (token == null) {
    throw new sCNotify("Please define a token as the first parameter.", sCNotifyTypes.ERROR);

  var client = new http.Client();
  try {
    Map<String, String> headers = {
      'appid': _app_id,
      'appsecret': _app_secret,
      'authtoken': token

    return await client.get(config.api_endpoint,
      headers: headers

  } catch(e) {
    return e;
  } finally {