Download artifact
Downloads the artifact content. The signed URL (with expires and sig query params) is obtained from the artifact metadata endpoint.
GET
/
artifact_downloads
/
{artifactId}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.artifactDownloads.retrieve('artifactId');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.artifact_downloads.retrieve(
"artifactId",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
artifactDownload, err := client.ArtifactDownloads.Get(
context.TODO(),
"artifactId",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", artifactDownload.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.artifactDownloads().retrieve("artifactId");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.artifact_downloads.retrieve("artifactId")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->artifactDownloads->retrieve(
'artifactId',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx artifact-downloads retrieve \
--api-key 'My API Key' \
--artifact-id artifactIdcurl --request GET \
--url https://api.telnyx.com/v2/artifact_downloads/{artifactId} \
--header 'Authorization: Bearer <token>'"<string>"{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"error": {
"code": "not_found",
"message": "session not found",
"retryable": false
}
}Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.artifactDownloads.retrieve('artifactId');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.artifact_downloads.retrieve(
"artifactId",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
artifactDownload, err := client.ArtifactDownloads.Get(
context.TODO(),
"artifactId",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", artifactDownload.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.artifactDownloads().retrieve("artifactId");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.artifact_downloads.retrieve("artifactId")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->artifactDownloads->retrieve(
'artifactId',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx artifact-downloads retrieve \
--api-key 'My API Key' \
--artifact-id artifactIdcurl --request GET \
--url https://api.telnyx.com/v2/artifact_downloads/{artifactId} \
--header 'Authorization: Bearer <token>'"<string>"{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"error": {
"code": "not_found",
"message": "session not found",
"retryable": false
}
}