Get artifact metadata
Returns artifact metadata and a signed download URL. The download URL requires Bearer auth.
GET
/
browser_sessions
/
{id}
/
artifacts
/
{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.browserSessions.retrieveArtifact('id', '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.browser_sessions.retrieve_artifact(
"id",
"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"),
)
response, err := client.BrowserSessions.GetArtifact(
context.TODO(),
"id",
"artifactId",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.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.browserSessions().retrieveArtifact("id", "artifactId");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.browser_sessions.retrieve_artifact("id", "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->browserSessions->retrieveArtifact(
'id',
'artifactId',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx browser-sessions retrieve-artifact \
--api-key 'My API Key' \
--id id \
--artifact-id artifactIdcurl --request GET \
--url https://api.telnyx.com/v2/browser_sessions/{id}/artifacts/{artifactId} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "bart_75975c73-...",
"session_id": "<string>",
"action_id": "<string>",
"type": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"checksum": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"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.browserSessions.retrieveArtifact('id', '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.browser_sessions.retrieve_artifact(
"id",
"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"),
)
response, err := client.BrowserSessions.GetArtifact(
context.TODO(),
"id",
"artifactId",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.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.browserSessions().retrieveArtifact("id", "artifactId");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.browser_sessions.retrieve_artifact("id", "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->browserSessions->retrieveArtifact(
'id',
'artifactId',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx browser-sessions retrieve-artifact \
--api-key 'My API Key' \
--id id \
--artifact-id artifactIdcurl --request GET \
--url https://api.telnyx.com/v2/browser_sessions/{id}/artifacts/{artifactId} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "bart_75975c73-...",
"session_id": "<string>",
"action_id": "<string>",
"type": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"checksum": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"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
}
}