I am using an OpenClaw agent and integrating with the Maton.ai (http://maton.ai/) API Gateway. I am consistently receiving a ‘401 Unauthorized’ error when making requests to https://ctrl.maton.ai/connections (for example, when trying to list or create connections for Google Calendar or Gmail). This happens even after generating and using a brand new API key. Could you please investigate why my Maton API key is not authorizing correctly for connection management?
Hi, could you DM your email so I can look into it further?
Also, could you please try these commands in your terminal?
- Check that the
MATON_API_KEYenvironment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF