The bash script sends a curl
The curl response example is
I need to get the random code "2aaea70fdccd7ad11e4ee8e82ec26162" (without quotes) and use it in the bash script.
Use jq to extract the value from the JSON, and command substitution to capture the output of the command:
code=$(curl ... | jq -r '.code')
Please login first before posting an answer.