Generate a deeplink URL that can be used to start an RCS conversation with a specific agent.
GET
/
messages
/
rcs_deeplinks
/
{agent_id}
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.messages.rcs.generateDeeplink('agent_id');
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.messages.rcs.generate_deeplink(
agent_id="agent_id",
)
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.Messages.Rcs.GenerateDeeplink(
context.TODO(),
"agent_id",
telnyx.MessageRcGenerateDeeplinkParams{},
)
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;
import com.telnyx.sdk.models.messages.rcs.RcGenerateDeeplinkParams;
import com.telnyx.sdk.models.messages.rcs.RcGenerateDeeplinkResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RcGenerateDeeplinkResponse response = client.messages().rcs().generateDeeplink("agent_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.messages.rcs.generate_deeplink("agent_id")
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->messages->rcs->generateDeeplink(
'agent_id', body: 'body', phoneNumber: 'phone_number'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messages:rcs generate-deeplink \
--api-key 'My API Key' \
--agent-id agent_idcurl --request GET \
--url https://api.telnyx.com/v2/messages/rcs_deeplinks/{agent_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"url": "sms:+18445550001?service_id=my_agent_id%40rbm.goog&body=hello%20world"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
RCS agent ID
Query Parameters
Phone number in E164 format (URL encoded)
Pre-filled message body (URL encoded)
Response
Successful response with deeplink URL
Show child attributes
Show child attributes
Was this page helpful?
⌘I
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.messages.rcs.generateDeeplink('agent_id');
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.messages.rcs.generate_deeplink(
agent_id="agent_id",
)
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.Messages.Rcs.GenerateDeeplink(
context.TODO(),
"agent_id",
telnyx.MessageRcGenerateDeeplinkParams{},
)
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;
import com.telnyx.sdk.models.messages.rcs.RcGenerateDeeplinkParams;
import com.telnyx.sdk.models.messages.rcs.RcGenerateDeeplinkResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RcGenerateDeeplinkResponse response = client.messages().rcs().generateDeeplink("agent_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.messages.rcs.generate_deeplink("agent_id")
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->messages->rcs->generateDeeplink(
'agent_id', body: 'body', phoneNumber: 'phone_number'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messages:rcs generate-deeplink \
--api-key 'My API Key' \
--agent-id agent_idcurl --request GET \
--url https://api.telnyx.com/v2/messages/rcs_deeplinks/{agent_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"url": "sms:+18445550001?service_id=my_agent_id%40rbm.goog&body=hello%20world"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}