Skip to main content
GET
/
mobile_push_credentials
/
{push_credential_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 pushCredentialResponse = await client.mobilePushCredentials.retrieve(
  '0ccc7b76-4df3-4bca-a05a-3da1ecc389f0',
);

console.log(pushCredentialResponse.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
)
push_credential_response = client.mobile_push_credentials.retrieve(
    "0ccc7b76-4df3-4bca-a05a-3da1ecc389f0",
)
print(push_credential_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"),
	)
	pushCredentialResponse, err := client.MobilePushCredentials.Get(context.TODO(), "0ccc7b76-4df3-4bca-a05a-3da1ecc389f0")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", pushCredentialResponse.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.mobilepushcredentials.MobilePushCredentialRetrieveParams;
import com.telnyx.sdk.models.mobilepushcredentials.PushCredentialResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        TelnyxClient client = TelnyxOkHttpClient.fromEnv();

        PushCredentialResponse pushCredentialResponse = client.mobilePushCredentials().retrieve("0ccc7b76-4df3-4bca-a05a-3da1ecc389f0");
    }
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

push_credential_response = telnyx.mobile_push_credentials.retrieve("0ccc7b76-4df3-4bca-a05a-3da1ecc389f0")

puts(push_credential_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 {
  $pushCredentialResponse = $client->mobilePushCredentials->retrieve(
    '0ccc7b76-4df3-4bca-a05a-3da1ecc389f0'
  );

  var_dump($pushCredentialResponse);
} catch (APIException $e) {
  echo $e->getMessage();
}
telnyx mobile-push-credentials retrieve \
  --api-key 'My API Key' \
  --push-credential-id 0ccc7b76-4df3-4bca-a05a-3da1ecc389f0
curl --request GET \
  --url https://api.telnyx.com/v2/mobile_push_credentials/{push_credential_id} \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": "0ccc7b54-4df3-4bcb-a65a-3da1ecc997d7",
    "certificate": "-----BEGIN CERTIFICATE----- MIIGVDCCBTKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END CERTIFICATE-----",
    "private_key": "-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END RSA PRIVATE KEY-----",
    "project_account_json_file": {
      "private_key": "BBBB0J56jd8kda:APA91vjb11BCjvxx3Jxja...",
      "client_email": "account@customer.org"
    },
    "alias": "LucyCredential",
    "type": "ios",
    "record_type": "push_credential",
    "created_at": "2021-03-26T17:51:59.588408Z",
    "updated_at": "2021-03-26T17:51:59.588408Z"
  }
}
{
  "errors": [
    {
      "code": "10015",
      "title": "Bad Request",
      "detail": "has already been taken",
      "source": {
        "pointer": "/mobile_push_credentials",
        "parameter": "application_name"
      },
      "meta": {
        "url": "https://developers.telnyx.com/docs/overview/errors/10015"
      }
    }
  ]
}
{
  "errors": [
    {
      "code": "10015",
      "title": "Bad Request",
      "detail": "has already been taken",
      "source": {
        "pointer": "/mobile_push_credentials",
        "parameter": "application_name"
      },
      "meta": {
        "url": "https://developers.telnyx.com/docs/overview/errors/10015"
      }
    }
  ]
}
{
  "errors": [
    {
      "code": "10015",
      "title": "Bad Request",
      "detail": "has already been taken",
      "source": {
        "pointer": "/mobile_push_credentials",
        "parameter": "application_name"
      },
      "meta": {
        "url": "https://developers.telnyx.com/docs/overview/errors/10015"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

push_credential_id
string<uuid>
required

The unique identifier of a mobile push credential

Example:

"0ccc7b76-4df3-4bca-a05a-3da1ecc389f0"

Response

Successful get mobile push credential response

Success response with details about a push credential

data
Successful response with details about a push credential · object