'restart all api on RTF using an shell script

i am trying to restart apis on Mule RTF using a script, but unable to login even, can anyone help?

below is the script :

#! /bin/bash

authToken=`curl -H "Content-Type: application/json" -X POST -d '{"username":"username","password":"password","recaptcha":""}' https://anypoint.mulesoft.com/login/`
curl  "https://anypoint.mulesoft.com/login/=$authToken"


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source