Hello,
I want to retrieve data from an app outside calponia. I
tried first to get an access token from this endpoint with this basic script
#!/bin/bash
SSH_PUB_KEY="${HOME}/.ssh/id_rsa.pub"
EMAIL=$(cat "$SSH_PUB_KEY" | awk '{print $3}')
KEY=$(cat "$SSH_PUB_KEY")
# Login
# https://api.calponia.com/v2/explorer/#operation/post_users_login_ssh
DATA="{ \"email\": \"${EMAIL}\", \"key\": \"${KEY}\"}"
curl -s --request POST \
-H "Content-Type: application/json" \
--data "$DATA" \
--url https://api.calponia.com/v2/users/login/ssh | jq
I get a 401
{
"error": {
"status": 401,
"code": "NOT_AUTHORIZED",
"title": "No valid authorization provided",
"detail": "The request requires authorization, but a valid one was not provided."
}
}
I may be wrong with what endpoint. Can we initialize a token from it without already be authentified?