让API支持全局token

refer to: #74