use endpoint from config