contabo / cntb

Contabo Command Line Interface
https://contabo.com
GNU General Public License v3.0
179 stars 24 forks source link

Missing quotes don't allow to login #26

Closed gaugau3000 closed 1 year ago

gaugau3000 commented 1 year ago

Be align with

CLIENT_ID= CLIENT_SECRET= API_USER= API_PASSWORD='' ACCESS_TOKEN=$(curl -d "client_id=$CLIENT_ID" -d "client_secret=$CLIENT_SECRET" --data-urlencode "username=$API_USER" --data-urlencode "password=$API_PASSWORD" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token')

get list of your instances

curl -X GET -H "Authorization: Bearer $ACCESS_TOKEN" -H "x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406" "https://api.contabo.com/v1/compute/instances" | jq

ngotzmann commented 1 year ago

Thank you!