Regenerate messaging profile secret
Regenerate the v1 secret for a messaging profile.
POST
/
messaging
/
profiles
/
{id}
/
actions
/
regenerate
/
secret
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.messagingProfiles.actions.regenerateSecret(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
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.messaging_profiles.actions.regenerate_secret(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
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.MessagingProfiles.Actions.RegenerateSecret(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
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.messagingprofiles.actions.ActionRegenerateSecretParams;
import com.telnyx.sdk.models.messagingprofiles.actions.ActionRegenerateSecretResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionRegenerateSecretResponse response = client.messagingProfiles().actions().regenerateSecret("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.messaging_profiles.actions.regenerate_secret("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
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->messagingProfiles->actions->regenerateSecret(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messaging-profiles:actions regenerate-secret \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request POST \
--url https://api.telnyx.com/v2/messaging/profiles/{id}/actions/regenerate/secret \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "messaging_profile",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Profile for Messages",
"webhook_url": "https://www.example.com/hooks",
"webhook_failover_url": "https://backup.example.com/hooks",
"enabled": true,
"webhook_api_version": "2",
"whitelisted_destinations": [
"US"
],
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"number_pool_settings": {
"toll_free_weight": 10,
"long_code_weight": 2,
"skip_unhealthy": false,
"sticky_sender": true,
"geomatch": false
},
"url_shortener_settings": {
"domain": "example.ex",
"prefix": "cmpny",
"replace_blacklist_only": true,
"send_webhooks": false
},
"v1_secret": "rP1VamejkU2v0qIUxntqLW2c",
"health_webhook_url": null,
"mms_fall_back_to_sms": false,
"mms_transcoding": false,
"daily_spend_limit": "100.00",
"daily_spend_limit_enabled": false,
"redaction_enabled": false,
"redaction_level": 2,
"mobile_only": false
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"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
The identifier of the messaging profile.
Response
Successful response with details about a messaging profile.
Show child attributes
Show child attributes
Example:
{ "record_type": "messaging_profile", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "Profile for Messages", "webhook_url": "https://www.example.com/hooks", "webhook_failover_url": "https://backup.example.com/hooks", "enabled": true, "webhook_api_version": "2", "whitelisted_destinations": ["US"], "created_at": "2019-01-23T18:10:02.574Z", "updated_at": "2019-01-23T18:10:02.574Z", "number_pool_settings": { "toll_free_weight": 10, "long_code_weight": 2, "skip_unhealthy": false, "sticky_sender": true, "geomatch": false }, "url_shortener_settings": { "domain": "example.ex", "prefix": "cmpny", "replace_blacklist_only": true, "send_webhooks": false }, "v1_secret": "rP1VamejkU2v0qIUxntqLW2c", "health_webhook_url": null, "mms_fall_back_to_sms": false, "mms_transcoding": false, "daily_spend_limit": "100.00", "daily_spend_limit_enabled": false, "redaction_enabled": false, "redaction_level": 2, "mobile_only": false }
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.messagingProfiles.actions.regenerateSecret(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
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.messaging_profiles.actions.regenerate_secret(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
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.MessagingProfiles.Actions.RegenerateSecret(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
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.messagingprofiles.actions.ActionRegenerateSecretParams;
import com.telnyx.sdk.models.messagingprofiles.actions.ActionRegenerateSecretResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionRegenerateSecretResponse response = client.messagingProfiles().actions().regenerateSecret("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.messaging_profiles.actions.regenerate_secret("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
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->messagingProfiles->actions->regenerateSecret(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messaging-profiles:actions regenerate-secret \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26ecurl --request POST \
--url https://api.telnyx.com/v2/messaging/profiles/{id}/actions/regenerate/secret \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "messaging_profile",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Profile for Messages",
"webhook_url": "https://www.example.com/hooks",
"webhook_failover_url": "https://backup.example.com/hooks",
"enabled": true,
"webhook_api_version": "2",
"whitelisted_destinations": [
"US"
],
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"number_pool_settings": {
"toll_free_weight": 10,
"long_code_weight": 2,
"skip_unhealthy": false,
"sticky_sender": true,
"geomatch": false
},
"url_shortener_settings": {
"domain": "example.ex",
"prefix": "cmpny",
"replace_blacklist_only": true,
"send_webhooks": false
},
"v1_secret": "rP1VamejkU2v0qIUxntqLW2c",
"health_webhook_url": null,
"mms_fall_back_to_sms": false,
"mms_transcoding": false,
"daily_spend_limit": "100.00",
"daily_spend_limit_enabled": false,
"redaction_enabled": false,
"redaction_level": 2,
"mobile_only": false
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}