github.com/twilio/twilio-go@v1.20.1/rest/conversations/v1/docs/CredentialsApi.md (about) 1 # CredentialsApi 2 3 All URIs are relative to *https://conversations.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateCredential**](CredentialsApi.md#CreateCredential) | **Post** /v1/Credentials | 8 [**DeleteCredential**](CredentialsApi.md#DeleteCredential) | **Delete** /v1/Credentials/{Sid} | 9 [**FetchCredential**](CredentialsApi.md#FetchCredential) | **Get** /v1/Credentials/{Sid} | 10 [**ListCredential**](CredentialsApi.md#ListCredential) | **Get** /v1/Credentials | 11 [**UpdateCredential**](CredentialsApi.md#UpdateCredential) | **Post** /v1/Credentials/{Sid} | 12 13 14 15 ## CreateCredential 16 17 > ConversationsV1Credential CreateCredential(ctx, optional) 18 19 20 21 Add a new push notification credential to your account 22 23 ### Path Parameters 24 25 This endpoint does not need any path parameter. 26 27 ### Other Parameters 28 29 Other parameters are passed through a pointer to a CreateCredentialParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **Type** | **string** | 35 **FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. 36 **Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. 37 **PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. 38 **Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. 39 **ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. 40 **Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. 41 42 ### Return type 43 44 [**ConversationsV1Credential**](ConversationsV1Credential.md) 45 46 ### Authorization 47 48 [accountSid_authToken](../README.md#accountSid_authToken) 49 50 ### HTTP request headers 51 52 - **Content-Type**: application/x-www-form-urlencoded 53 - **Accept**: application/json 54 55 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 56 [[Back to Model list]](../README.md#documentation-for-models) 57 [[Back to README]](../README.md) 58 59 60 ## DeleteCredential 61 62 > DeleteCredential(ctx, Sid) 63 64 65 66 Remove a push notification credential from your account 67 68 ### Path Parameters 69 70 71 Name | Type | Description 72 ------------- | ------------- | ------------- 73 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 74 **Sid** | **string** | A 34 character string that uniquely identifies this resource. 75 76 ### Other Parameters 77 78 Other parameters are passed through a pointer to a DeleteCredentialParams struct 79 80 81 Name | Type | Description 82 ------------- | ------------- | ------------- 83 84 ### Return type 85 86 (empty response body) 87 88 ### Authorization 89 90 [accountSid_authToken](../README.md#accountSid_authToken) 91 92 ### HTTP request headers 93 94 - **Content-Type**: Not defined 95 - **Accept**: Not defined 96 97 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 98 [[Back to Model list]](../README.md#documentation-for-models) 99 [[Back to README]](../README.md) 100 101 102 ## FetchCredential 103 104 > ConversationsV1Credential FetchCredential(ctx, Sid) 105 106 107 108 Fetch a push notification credential from your account 109 110 ### Path Parameters 111 112 113 Name | Type | Description 114 ------------- | ------------- | ------------- 115 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 116 **Sid** | **string** | A 34 character string that uniquely identifies this resource. 117 118 ### Other Parameters 119 120 Other parameters are passed through a pointer to a FetchCredentialParams struct 121 122 123 Name | Type | Description 124 ------------- | ------------- | ------------- 125 126 ### Return type 127 128 [**ConversationsV1Credential**](ConversationsV1Credential.md) 129 130 ### Authorization 131 132 [accountSid_authToken](../README.md#accountSid_authToken) 133 134 ### HTTP request headers 135 136 - **Content-Type**: Not defined 137 - **Accept**: application/json 138 139 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 140 [[Back to Model list]](../README.md#documentation-for-models) 141 [[Back to README]](../README.md) 142 143 144 ## ListCredential 145 146 > []ConversationsV1Credential ListCredential(ctx, optional) 147 148 149 150 Retrieve a list of all push notification credentials on your account 151 152 ### Path Parameters 153 154 This endpoint does not need any path parameter. 155 156 ### Other Parameters 157 158 Other parameters are passed through a pointer to a ListCredentialParams struct 159 160 161 Name | Type | Description 162 ------------- | ------------- | ------------- 163 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 164 **Limit** | **int** | Max number of records to return. 165 166 ### Return type 167 168 [**[]ConversationsV1Credential**](ConversationsV1Credential.md) 169 170 ### Authorization 171 172 [accountSid_authToken](../README.md#accountSid_authToken) 173 174 ### HTTP request headers 175 176 - **Content-Type**: Not defined 177 - **Accept**: application/json 178 179 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 180 [[Back to Model list]](../README.md#documentation-for-models) 181 [[Back to README]](../README.md) 182 183 184 ## UpdateCredential 185 186 > ConversationsV1Credential UpdateCredential(ctx, Sidoptional) 187 188 189 190 Update an existing push notification credential on your account 191 192 ### Path Parameters 193 194 195 Name | Type | Description 196 ------------- | ------------- | ------------- 197 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 198 **Sid** | **string** | A 34 character string that uniquely identifies this resource. 199 200 ### Other Parameters 201 202 Other parameters are passed through a pointer to a UpdateCredentialParams struct 203 204 205 Name | Type | Description 206 ------------- | ------------- | ------------- 207 **Type** | **string** | 208 **FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. 209 **Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. 210 **PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. 211 **Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. 212 **ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. 213 **Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. 214 215 ### Return type 216 217 [**ConversationsV1Credential**](ConversationsV1Credential.md) 218 219 ### Authorization 220 221 [accountSid_authToken](../README.md#accountSid_authToken) 222 223 ### HTTP request headers 224 225 - **Content-Type**: application/x-www-form-urlencoded 226 - **Accept**: application/json 227 228 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 229 [[Back to Model list]](../README.md#documentation-for-models) 230 [[Back to README]](../README.md) 231