JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.data.icm.get({
messageId: "acf1c8b06f9aec48e9fcbefbbe576ae8a7ca3b327fcae111396e7cc99956674d",
});
console.log(result);
}
run();curl --request GET \
--url https://glacier-api.avax.network/v1/icm/messages/{messageId} \
--header 'x-glacier-api-key: <api-key>'import requests
url = "https://glacier-api.avax.network/v1/icm/messages/{messageId}"
headers = {"x-glacier-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://glacier-api.avax.network/v1/icm/messages/{messageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-glacier-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://glacier-api.avax.network/v1/icm/messages/{messageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-glacier-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://glacier-api.avax.network/v1/icm/messages/{messageId}")
.header("x-glacier-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/icm/messages/{messageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-glacier-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"messageId": "<string>",
"icmContractAddress": "<string>",
"sourceBlockchainId": "<string>",
"destinationBlockchainId": "<string>",
"sourceEvmChainId": "<string>",
"destinationEvmChainId": "<string>",
"messageNonce": "<string>",
"from": "<string>",
"to": "<string>",
"messageExecuted": true,
"receipts": [
{
"receivedMessageNonce": "<string>",
"relayerRewardAddress": "<string>"
}
],
"receiptDelivered": true,
"rewardDetails": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"value": "<string>",
"logoUri": "<string>",
"price": {
"value": 123
}
},
"sourceTransaction": {
"txHash": "<string>",
"timestamp": 123,
"gasSpent": "<string>"
},
"status": "pending",
"data": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}Interchain Messaging
Get an ICM message
Gets an ICM message by teleporter message ID.
GET
/
v1
/
icm
/
messages
/
{messageId}
JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.data.icm.get({
messageId: "acf1c8b06f9aec48e9fcbefbbe576ae8a7ca3b327fcae111396e7cc99956674d",
});
console.log(result);
}
run();curl --request GET \
--url https://glacier-api.avax.network/v1/icm/messages/{messageId} \
--header 'x-glacier-api-key: <api-key>'import requests
url = "https://glacier-api.avax.network/v1/icm/messages/{messageId}"
headers = {"x-glacier-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://glacier-api.avax.network/v1/icm/messages/{messageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-glacier-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://glacier-api.avax.network/v1/icm/messages/{messageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-glacier-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://glacier-api.avax.network/v1/icm/messages/{messageId}")
.header("x-glacier-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/icm/messages/{messageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-glacier-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"messageId": "<string>",
"icmContractAddress": "<string>",
"sourceBlockchainId": "<string>",
"destinationBlockchainId": "<string>",
"sourceEvmChainId": "<string>",
"destinationEvmChainId": "<string>",
"messageNonce": "<string>",
"from": "<string>",
"to": "<string>",
"messageExecuted": true,
"receipts": [
{
"receivedMessageNonce": "<string>",
"relayerRewardAddress": "<string>"
}
],
"receiptDelivered": true,
"rewardDetails": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"value": "<string>",
"logoUri": "<string>",
"price": {
"value": 123
}
},
"sourceTransaction": {
"txHash": "<string>",
"timestamp": 123,
"gasSpent": "<string>"
},
"status": "pending",
"data": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}Authorizations
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Path Parameters
The teleporter message ID of the ICM message.
Response
Successful response
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
pending Was this page helpful?
⌘I