[R] Remove unused funcs, n some other refactoring

func invokeAPI() get token itself, depending on args no longer.