fix the to get token data to build API rest query string