fixed an error when calling the token api.  was expecting an object not an array