Notification Hubs - Get Pns Credentials
Lists the PNS Credentials associated with a notification hub.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/pnsCredentials?api-version=2023-09-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
namespace
|
path | True |
string |
Namespace name Regex pattern: |
notification
|
path | True |
string |
Notification Hub name Regex pattern: |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string uuid |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
Error code with reason. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
NotificationHubs_GetPnsCredentials
Sample request
POST https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub/pnsCredentials?api-version=2023-09-01
Sample response
{
"properties": {
"gcmCredential": {
"properties": {
"gcmEndpoint": "https://fcm.googleapis.com/fcm/send",
"googleApiKey": "###################################"
}
}
},
"id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test",
"name": "test",
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs/pnsCredentials"
}
Definitions
Name | Description |
---|---|
Adm |
Description of a NotificationHub AdmCredential. |
Adm |
Description of a NotificationHub AdmCredential. |
Apns |
Description of a NotificationHub ApnsCredential. |
Apns |
Description of a NotificationHub ApnsCredential. |
Baidu |
Description of a NotificationHub BaiduCredential. |
Baidu |
Description of a NotificationHub BaiduCredential. |
Browser |
Description of a NotificationHub BrowserCredential. |
Browser |
Description of a NotificationHub BrowserCredential. |
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Gcm |
Description of a NotificationHub GcmCredential. |
Gcm |
Description of a NotificationHub GcmCredential. |
Mpns |
Description of a NotificationHub MpnsCredential. |
Mpns |
Description of a NotificationHub MpnsCredential. |
Pns |
Collection of Notification Hub or Notification Hub Namespace PNS credentials. |
Pns |
Description of a NotificationHub PNS Credentials. This is a response of the POST requests that return namespace or hubs PNS credentials. |
system |
Metadata pertaining to creation and last modification of the resource. |
Wns |
Description of a NotificationHub WnsCredential. |
Wns |
Description of a NotificationHub WnsCredential. |
Xiaomi |
Description of a NotificationHub XiaomiCredential. |
Xiaomi |
Description of a NotificationHub XiaomiCredentialProperties. |
AdmCredential
Description of a NotificationHub AdmCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub AdmCredential. |
AdmCredentialProperties
Description of a NotificationHub AdmCredential.
Name | Type | Description |
---|---|---|
authTokenUrl |
string |
Gets or sets the URL of the authorization token. |
clientId |
string |
Gets or sets the client identifier. |
clientSecret |
string |
Gets or sets the credential secret access key. |
ApnsCredential
Description of a NotificationHub ApnsCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub ApnsCredential. |
ApnsCredentialProperties
Description of a NotificationHub ApnsCredential.
Name | Type | Description |
---|---|---|
apnsCertificate |
string |
Gets or sets the APNS certificate. |
appId |
string |
Gets or sets the issuer (iss) registered claim key, whose value is your 10-character Team ID, obtained from your developer account |
appName |
string |
Gets or sets the name of the application |
certificateKey |
string |
Gets or sets the certificate key. |
endpoint |
string |
Gets or sets the endpoint of this credential. |
keyId |
string |
Gets or sets a 10-character key identifier (kid) key, obtained from your developer account |
thumbprint |
string |
Gets or sets the APNS certificate Thumbprint |
token |
string |
Gets or sets provider Authentication Token, obtained through your developer account |
BaiduCredential
Description of a NotificationHub BaiduCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub BaiduCredential. |
BaiduCredentialProperties
Description of a NotificationHub BaiduCredential.
Name | Type | Description |
---|---|---|
baiduApiKey |
string |
Gets or sets baidu Api Key. |
baiduEndPoint |
string |
Gets or sets baidu Endpoint. |
baiduSecretKey |
string |
Gets or sets baidu Secret Key |
BrowserCredential
Description of a NotificationHub BrowserCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub BrowserCredential. |
BrowserCredentialProperties
Description of a NotificationHub BrowserCredential.
Name | Type | Description |
---|---|---|
subject |
string |
Gets or sets web push subject. |
vapidPrivateKey |
string |
Gets or sets VAPID private key. |
vapidPublicKey |
string |
Gets or sets VAPID public key. |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
GcmCredential
Description of a NotificationHub GcmCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub GcmCredential. |
GcmCredentialProperties
Description of a NotificationHub GcmCredential.
Name | Type | Description |
---|---|---|
gcmEndpoint |
string |
Gets or sets the GCM endpoint. |
googleApiKey |
string |
Gets or sets the Google API key. |
MpnsCredential
Description of a NotificationHub MpnsCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub MpnsCredential. |
MpnsCredentialProperties
Description of a NotificationHub MpnsCredential.
Name | Type | Description |
---|---|---|
certificateKey |
string |
Gets or sets the certificate key for this credential. |
mpnsCertificate |
string |
Gets or sets the MPNS certificate. |
thumbprint |
string |
Gets or sets the MPNS certificate Thumbprint |
PnsCredentials
Collection of Notification Hub or Notification Hub Namespace PNS credentials.
Name | Type | Description |
---|---|---|
admCredential |
Description of a NotificationHub AdmCredential. |
|
apnsCredential |
Description of a NotificationHub ApnsCredential. |
|
baiduCredential |
Description of a NotificationHub BaiduCredential. |
|
browserCredential |
Description of a NotificationHub BrowserCredential. |
|
gcmCredential |
Description of a NotificationHub GcmCredential. |
|
mpnsCredential |
Description of a NotificationHub MpnsCredential. |
|
wnsCredential |
Description of a NotificationHub WnsCredential. |
|
xiaomiCredential |
Description of a NotificationHub XiaomiCredential. |
PnsCredentialsResource
Description of a NotificationHub PNS Credentials. This is a response of the POST requests that return namespace or hubs PNS credentials.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
location |
string |
Deprecated - only for compatibility. |
name |
string |
The name of the resource |
properties |
Collection of Notification Hub or Notification Hub Namespace PNS credentials. |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
tags |
object |
Deprecated - only for compatibility. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
WnsCredential
Description of a NotificationHub WnsCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub WnsCredential. |
WnsCredentialProperties
Description of a NotificationHub WnsCredential.
Name | Type | Description |
---|---|---|
certificateKey |
string |
Ges or sets the WNS Certificate Key. |
packageSid |
string |
Gets or sets the package ID for this credential. |
secretKey |
string |
Gets or sets the secret key. |
windowsLiveEndpoint |
string |
Gets or sets the Windows Live endpoint. |
wnsCertificate |
string |
Gets or sets the WNS Certificate. |
XiaomiCredential
Description of a NotificationHub XiaomiCredential.
Name | Type | Description |
---|---|---|
properties |
Description of a NotificationHub XiaomiCredentialProperties. |
XiaomiCredentialProperties
Description of a NotificationHub XiaomiCredentialProperties.
Name | Type | Description |
---|---|---|
appSecret |
string |
Gets or sets app secret. |
endpoint |
string |
Gets or sets xiaomi service endpoint. |