//Step 1: Retrieves access and refresh tokens that a Wix OAuth app can use to make API calls on behalf of a site visitor
response=$(curl -s --location 'https://www.wixapis.com/oauth2/token' \
-H 'Content-Type: application/json' \
-d '{
"clientId": "6f52a816-8d05-4208-aab1-e0ff22e57a88",
"grantType": "anonymous"
}')
// Step 2: Extract the access token from the response using grep and cut
token=$(echo $response | grep -o '"access_token":"[^"]*' | cut -d'"' -f4)
// Step 3: Use the access token to make API calls to the Wix APIs
curl -X POST 'https://www.wixapis.com/bookings/v2/services/query' \
-H 'Content-Type: application/json' \
-H "Authorization: $token" \
-d '{
"query": {}
}'