adding support for api tokens pt.1