curl --request POST \
--url https://us.infisical.com/api/v1/auth/alicloud-auth/login \
--header 'Content-Type: application/json' \
--data '
{
"identityId": "<string>",
"Action": "GetCallerIdentity",
"Format": "JSON",
"Version": "<string>",
"AccessKeyId": "<string>",
"SignatureMethod": "HMAC-SHA1",
"Timestamp": "2023-11-07T05:31:56Z",
"SignatureVersion": "1.0",
"SignatureNonce": "<string>",
"Signature": "<string>",
"organizationSlug": "<string>"
}
'import requests
url = "https://us.infisical.com/api/v1/auth/alicloud-auth/login"
payload = {
"identityId": "<string>",
"Action": "GetCallerIdentity",
"Format": "JSON",
"Version": "<string>",
"AccessKeyId": "<string>",
"SignatureMethod": "HMAC-SHA1",
"Timestamp": "2023-11-07T05:31:56Z",
"SignatureVersion": "1.0",
"SignatureNonce": "<string>",
"Signature": "<string>",
"organizationSlug": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identityId: '<string>',
Action: 'GetCallerIdentity',
Format: 'JSON',
Version: '<string>',
AccessKeyId: '<string>',
SignatureMethod: 'HMAC-SHA1',
Timestamp: '2023-11-07T05:31:56Z',
SignatureVersion: '1.0',
SignatureNonce: '<string>',
Signature: '<string>',
organizationSlug: '<string>'
})
};
fetch('https://us.infisical.com/api/v1/auth/alicloud-auth/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us.infisical.com/api/v1/auth/alicloud-auth/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identityId' => '<string>',
'Action' => 'GetCallerIdentity',
'Format' => 'JSON',
'Version' => '<string>',
'AccessKeyId' => '<string>',
'SignatureMethod' => 'HMAC-SHA1',
'Timestamp' => '2023-11-07T05:31:56Z',
'SignatureVersion' => '1.0',
'SignatureNonce' => '<string>',
'Signature' => '<string>',
'organizationSlug' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us.infisical.com/api/v1/auth/alicloud-auth/login"
payload := strings.NewReader("{\n \"identityId\": \"<string>\",\n \"Action\": \"GetCallerIdentity\",\n \"Format\": \"JSON\",\n \"Version\": \"<string>\",\n \"AccessKeyId\": \"<string>\",\n \"SignatureMethod\": \"HMAC-SHA1\",\n \"Timestamp\": \"2023-11-07T05:31:56Z\",\n \"SignatureVersion\": \"1.0\",\n \"SignatureNonce\": \"<string>\",\n \"Signature\": \"<string>\",\n \"organizationSlug\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us.infisical.com/api/v1/auth/alicloud-auth/login")
.header("Content-Type", "application/json")
.body("{\n \"identityId\": \"<string>\",\n \"Action\": \"GetCallerIdentity\",\n \"Format\": \"JSON\",\n \"Version\": \"<string>\",\n \"AccessKeyId\": \"<string>\",\n \"SignatureMethod\": \"HMAC-SHA1\",\n \"Timestamp\": \"2023-11-07T05:31:56Z\",\n \"SignatureVersion\": \"1.0\",\n \"SignatureNonce\": \"<string>\",\n \"Signature\": \"<string>\",\n \"organizationSlug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/auth/alicloud-auth/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"identityId\": \"<string>\",\n \"Action\": \"GetCallerIdentity\",\n \"Format\": \"JSON\",\n \"Version\": \"<string>\",\n \"AccessKeyId\": \"<string>\",\n \"SignatureMethod\": \"HMAC-SHA1\",\n \"Timestamp\": \"2023-11-07T05:31:56Z\",\n \"SignatureVersion\": \"1.0\",\n \"SignatureNonce\": \"<string>\",\n \"Signature\": \"<string>\",\n \"organizationSlug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accessToken": "<string>",
"expiresIn": 123,
"accessTokenMaxTTL": 123,
"tokenType": "Bearer"
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Login
Login with Alibaba Cloud Auth for machine identity
curl --request POST \
--url https://us.infisical.com/api/v1/auth/alicloud-auth/login \
--header 'Content-Type: application/json' \
--data '
{
"identityId": "<string>",
"Action": "GetCallerIdentity",
"Format": "JSON",
"Version": "<string>",
"AccessKeyId": "<string>",
"SignatureMethod": "HMAC-SHA1",
"Timestamp": "2023-11-07T05:31:56Z",
"SignatureVersion": "1.0",
"SignatureNonce": "<string>",
"Signature": "<string>",
"organizationSlug": "<string>"
}
'import requests
url = "https://us.infisical.com/api/v1/auth/alicloud-auth/login"
payload = {
"identityId": "<string>",
"Action": "GetCallerIdentity",
"Format": "JSON",
"Version": "<string>",
"AccessKeyId": "<string>",
"SignatureMethod": "HMAC-SHA1",
"Timestamp": "2023-11-07T05:31:56Z",
"SignatureVersion": "1.0",
"SignatureNonce": "<string>",
"Signature": "<string>",
"organizationSlug": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identityId: '<string>',
Action: 'GetCallerIdentity',
Format: 'JSON',
Version: '<string>',
AccessKeyId: '<string>',
SignatureMethod: 'HMAC-SHA1',
Timestamp: '2023-11-07T05:31:56Z',
SignatureVersion: '1.0',
SignatureNonce: '<string>',
Signature: '<string>',
organizationSlug: '<string>'
})
};
fetch('https://us.infisical.com/api/v1/auth/alicloud-auth/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us.infisical.com/api/v1/auth/alicloud-auth/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identityId' => '<string>',
'Action' => 'GetCallerIdentity',
'Format' => 'JSON',
'Version' => '<string>',
'AccessKeyId' => '<string>',
'SignatureMethod' => 'HMAC-SHA1',
'Timestamp' => '2023-11-07T05:31:56Z',
'SignatureVersion' => '1.0',
'SignatureNonce' => '<string>',
'Signature' => '<string>',
'organizationSlug' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us.infisical.com/api/v1/auth/alicloud-auth/login"
payload := strings.NewReader("{\n \"identityId\": \"<string>\",\n \"Action\": \"GetCallerIdentity\",\n \"Format\": \"JSON\",\n \"Version\": \"<string>\",\n \"AccessKeyId\": \"<string>\",\n \"SignatureMethod\": \"HMAC-SHA1\",\n \"Timestamp\": \"2023-11-07T05:31:56Z\",\n \"SignatureVersion\": \"1.0\",\n \"SignatureNonce\": \"<string>\",\n \"Signature\": \"<string>\",\n \"organizationSlug\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us.infisical.com/api/v1/auth/alicloud-auth/login")
.header("Content-Type", "application/json")
.body("{\n \"identityId\": \"<string>\",\n \"Action\": \"GetCallerIdentity\",\n \"Format\": \"JSON\",\n \"Version\": \"<string>\",\n \"AccessKeyId\": \"<string>\",\n \"SignatureMethod\": \"HMAC-SHA1\",\n \"Timestamp\": \"2023-11-07T05:31:56Z\",\n \"SignatureVersion\": \"1.0\",\n \"SignatureNonce\": \"<string>\",\n \"Signature\": \"<string>\",\n \"organizationSlug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/auth/alicloud-auth/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"identityId\": \"<string>\",\n \"Action\": \"GetCallerIdentity\",\n \"Format\": \"JSON\",\n \"Version\": \"<string>\",\n \"AccessKeyId\": \"<string>\",\n \"SignatureMethod\": \"HMAC-SHA1\",\n \"Timestamp\": \"2023-11-07T05:31:56Z\",\n \"SignatureVersion\": \"1.0\",\n \"SignatureNonce\": \"<string>\",\n \"Signature\": \"<string>\",\n \"organizationSlug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accessToken": "<string>",
"expiresIn": 123,
"accessTokenMaxTTL": 123,
"tokenType": "Bearer"
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Body
The ID of the machine identity to login.
The Alibaba Cloud API action. For STS GetCallerIdentity, this should be 'GetCallerIdentity'.
GetCallerIdentity The response format. For STS GetCallerIdentity, this should be 'JSON'.
JSON The API version. This should be in 'YYYY-MM-DD' format (e.g., '2015-04-01').
The AccessKey ID of the RAM user or STS token.
The signature algorithm. For STS GetCallerIdentity, this should be 'HMAC-SHA1'.
HMAC-SHA1 The timestamp of the request in UTC, formatted as 'YYYY-MM-DDTHH:mm:ssZ'.
The signature version. For STS GetCallerIdentity, this should be '1.0'.
1.0 A unique random string to prevent replay attacks.
The signature string calculated based on the request parameters and AccessKey Secret.
When set, this will scope the login session to the specified organization the machine identity has access to. If omitted, the session defaults to the organization where the machine identity was created in.
1 - 64Was this page helpful?