def add_sid_token(reqs_data, sid):
    """
    add sid token in requests params
    :param reqs_data: requests kwargs
    :param sid: sid token
    :return:
    """
    if 'params' not in reqs_data:
        reqs_data['params'] = {}
    if 'api' not in reqs_data['params'] and 'api=' not in reqs_data.get('data',
        ''):
        return reqs_data
    if reqs_data['params'].get('api') != 'SYNO.API.Auth':
        reqs_data['params']['_sid'] = sid
    return reqs_data
