github.com/twilio/twilio-go@v1.20.1/rest/accounts/v1/docs/CredentialsPublicKeysApi.md (about)

     1  # CredentialsPublicKeysApi
     2  
     3  All URIs are relative to *https://accounts.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateCredentialPublicKey**](CredentialsPublicKeysApi.md#CreateCredentialPublicKey) | **Post** /v1/Credentials/PublicKeys | 
     8  [**DeleteCredentialPublicKey**](CredentialsPublicKeysApi.md#DeleteCredentialPublicKey) | **Delete** /v1/Credentials/PublicKeys/{Sid} | 
     9  [**FetchCredentialPublicKey**](CredentialsPublicKeysApi.md#FetchCredentialPublicKey) | **Get** /v1/Credentials/PublicKeys/{Sid} | 
    10  [**ListCredentialPublicKey**](CredentialsPublicKeysApi.md#ListCredentialPublicKey) | **Get** /v1/Credentials/PublicKeys | 
    11  [**UpdateCredentialPublicKey**](CredentialsPublicKeysApi.md#UpdateCredentialPublicKey) | **Post** /v1/Credentials/PublicKeys/{Sid} | 
    12  
    13  
    14  
    15  ## CreateCredentialPublicKey
    16  
    17  > AccountsV1CredentialPublicKey CreateCredentialPublicKey(ctx, optional)
    18  
    19  
    20  
    21  Create a new Public Key Credential
    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 CreateCredentialPublicKeyParams struct
    30  
    31  
    32  Name | Type | Description
    33  ------------- | ------------- | -------------
    34  **PublicKey** | **string** | A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----`
    35  **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long.
    36  **AccountSid** | **string** | The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request
    37  
    38  ### Return type
    39  
    40  [**AccountsV1CredentialPublicKey**](AccountsV1CredentialPublicKey.md)
    41  
    42  ### Authorization
    43  
    44  [accountSid_authToken](../README.md#accountSid_authToken)
    45  
    46  ### HTTP request headers
    47  
    48  - **Content-Type**: application/x-www-form-urlencoded
    49  - **Accept**: application/json
    50  
    51  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    52  [[Back to Model list]](../README.md#documentation-for-models)
    53  [[Back to README]](../README.md)
    54  
    55  
    56  ## DeleteCredentialPublicKey
    57  
    58  > DeleteCredentialPublicKey(ctx, Sid)
    59  
    60  
    61  
    62  Delete a Credential from your account
    63  
    64  ### Path Parameters
    65  
    66  
    67  Name | Type | Description
    68  ------------- | ------------- | -------------
    69  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    70  **Sid** | **string** | The Twilio-provided string that uniquely identifies the PublicKey resource to delete.
    71  
    72  ### Other Parameters
    73  
    74  Other parameters are passed through a pointer to a DeleteCredentialPublicKeyParams struct
    75  
    76  
    77  Name | Type | Description
    78  ------------- | ------------- | -------------
    79  
    80  ### Return type
    81  
    82   (empty response body)
    83  
    84  ### Authorization
    85  
    86  [accountSid_authToken](../README.md#accountSid_authToken)
    87  
    88  ### HTTP request headers
    89  
    90  - **Content-Type**: Not defined
    91  - **Accept**: Not defined
    92  
    93  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    94  [[Back to Model list]](../README.md#documentation-for-models)
    95  [[Back to README]](../README.md)
    96  
    97  
    98  ## FetchCredentialPublicKey
    99  
   100  > AccountsV1CredentialPublicKey FetchCredentialPublicKey(ctx, Sid)
   101  
   102  
   103  
   104  Fetch the public key specified by the provided Credential Sid
   105  
   106  ### Path Parameters
   107  
   108  
   109  Name | Type | Description
   110  ------------- | ------------- | -------------
   111  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   112  **Sid** | **string** | The Twilio-provided string that uniquely identifies the PublicKey resource to fetch.
   113  
   114  ### Other Parameters
   115  
   116  Other parameters are passed through a pointer to a FetchCredentialPublicKeyParams struct
   117  
   118  
   119  Name | Type | Description
   120  ------------- | ------------- | -------------
   121  
   122  ### Return type
   123  
   124  [**AccountsV1CredentialPublicKey**](AccountsV1CredentialPublicKey.md)
   125  
   126  ### Authorization
   127  
   128  [accountSid_authToken](../README.md#accountSid_authToken)
   129  
   130  ### HTTP request headers
   131  
   132  - **Content-Type**: Not defined
   133  - **Accept**: application/json
   134  
   135  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   136  [[Back to Model list]](../README.md#documentation-for-models)
   137  [[Back to README]](../README.md)
   138  
   139  
   140  ## ListCredentialPublicKey
   141  
   142  > []AccountsV1CredentialPublicKey ListCredentialPublicKey(ctx, optional)
   143  
   144  
   145  
   146  Retrieves a collection of Public Key Credentials belonging to the account used to make the request
   147  
   148  ### Path Parameters
   149  
   150  This endpoint does not need any path parameter.
   151  
   152  ### Other Parameters
   153  
   154  Other parameters are passed through a pointer to a ListCredentialPublicKeyParams struct
   155  
   156  
   157  Name | Type | Description
   158  ------------- | ------------- | -------------
   159  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   160  **Limit** | **int** | Max number of records to return.
   161  
   162  ### Return type
   163  
   164  [**[]AccountsV1CredentialPublicKey**](AccountsV1CredentialPublicKey.md)
   165  
   166  ### Authorization
   167  
   168  [accountSid_authToken](../README.md#accountSid_authToken)
   169  
   170  ### HTTP request headers
   171  
   172  - **Content-Type**: Not defined
   173  - **Accept**: application/json
   174  
   175  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   176  [[Back to Model list]](../README.md#documentation-for-models)
   177  [[Back to README]](../README.md)
   178  
   179  
   180  ## UpdateCredentialPublicKey
   181  
   182  > AccountsV1CredentialPublicKey UpdateCredentialPublicKey(ctx, Sidoptional)
   183  
   184  
   185  
   186  Modify the properties of a given Account
   187  
   188  ### Path Parameters
   189  
   190  
   191  Name | Type | Description
   192  ------------- | ------------- | -------------
   193  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   194  **Sid** | **string** | The Twilio-provided string that uniquely identifies the PublicKey resource to update.
   195  
   196  ### Other Parameters
   197  
   198  Other parameters are passed through a pointer to a UpdateCredentialPublicKeyParams struct
   199  
   200  
   201  Name | Type | Description
   202  ------------- | ------------- | -------------
   203  **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long.
   204  
   205  ### Return type
   206  
   207  [**AccountsV1CredentialPublicKey**](AccountsV1CredentialPublicKey.md)
   208  
   209  ### Authorization
   210  
   211  [accountSid_authToken](../README.md#accountSid_authToken)
   212  
   213  ### HTTP request headers
   214  
   215  - **Content-Type**: application/x-www-form-urlencoded
   216  - **Accept**: application/json
   217  
   218  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   219  [[Back to Model list]](../README.md#documentation-for-models)
   220  [[Back to README]](../README.md)
   221