github.com/twilio/twilio-go@v1.20.1/rest/chat/v2/docs/ServicesUsersApi.md (about)

     1  # ServicesUsersApi
     2  
     3  All URIs are relative to *https://chat.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateUser**](ServicesUsersApi.md#CreateUser) | **Post** /v2/Services/{ServiceSid}/Users | 
     8  [**DeleteUser**](ServicesUsersApi.md#DeleteUser) | **Delete** /v2/Services/{ServiceSid}/Users/{Sid} | 
     9  [**FetchUser**](ServicesUsersApi.md#FetchUser) | **Get** /v2/Services/{ServiceSid}/Users/{Sid} | 
    10  [**ListUser**](ServicesUsersApi.md#ListUser) | **Get** /v2/Services/{ServiceSid}/Users | 
    11  [**UpdateUser**](ServicesUsersApi.md#UpdateUser) | **Post** /v2/Services/{ServiceSid}/Users/{Sid} | 
    12  
    13  
    14  
    15  ## CreateUser
    16  
    17  > ChatV2User CreateUser(ctx, ServiceSidoptional)
    18  
    19  
    20  
    21  
    22  
    23  ### Path Parameters
    24  
    25  
    26  Name | Type | Description
    27  ------------- | ------------- | -------------
    28  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    29  **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the User resource under.
    30  
    31  ### Other Parameters
    32  
    33  Other parameters are passed through a pointer to a CreateUserParams struct
    34  
    35  
    36  Name | Type | Description
    37  ------------- | ------------- | -------------
    38  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
    39  **Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info.
    40  **RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User.
    41  **Attributes** | **string** | A valid JSON string that contains application-specific data.
    42  **FriendlyName** | **string** | A descriptive string that you create to describe the new resource. This value is often used for display purposes.
    43  
    44  ### Return type
    45  
    46  [**ChatV2User**](ChatV2User.md)
    47  
    48  ### Authorization
    49  
    50  [accountSid_authToken](../README.md#accountSid_authToken)
    51  
    52  ### HTTP request headers
    53  
    54  - **Content-Type**: application/x-www-form-urlencoded
    55  - **Accept**: application/json
    56  
    57  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    58  [[Back to Model list]](../README.md#documentation-for-models)
    59  [[Back to README]](../README.md)
    60  
    61  
    62  ## DeleteUser
    63  
    64  > DeleteUser(ctx, ServiceSidSid)
    65  
    66  
    67  
    68  
    69  
    70  ### Path Parameters
    71  
    72  
    73  Name | Type | Description
    74  ------------- | ------------- | -------------
    75  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    76  **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User resource from.
    77  **Sid** | **string** | The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete.
    78  
    79  ### Other Parameters
    80  
    81  Other parameters are passed through a pointer to a DeleteUserParams struct
    82  
    83  
    84  Name | Type | Description
    85  ------------- | ------------- | -------------
    86  
    87  ### Return type
    88  
    89   (empty response body)
    90  
    91  ### Authorization
    92  
    93  [accountSid_authToken](../README.md#accountSid_authToken)
    94  
    95  ### HTTP request headers
    96  
    97  - **Content-Type**: Not defined
    98  - **Accept**: Not defined
    99  
   100  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   101  [[Back to Model list]](../README.md#documentation-for-models)
   102  [[Back to README]](../README.md)
   103  
   104  
   105  ## FetchUser
   106  
   107  > ChatV2User FetchUser(ctx, ServiceSidSid)
   108  
   109  
   110  
   111  
   112  
   113  ### Path Parameters
   114  
   115  
   116  Name | Type | Description
   117  ------------- | ------------- | -------------
   118  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   119  **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User resource from.
   120  **Sid** | **string** | The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch.
   121  
   122  ### Other Parameters
   123  
   124  Other parameters are passed through a pointer to a FetchUserParams struct
   125  
   126  
   127  Name | Type | Description
   128  ------------- | ------------- | -------------
   129  
   130  ### Return type
   131  
   132  [**ChatV2User**](ChatV2User.md)
   133  
   134  ### Authorization
   135  
   136  [accountSid_authToken](../README.md#accountSid_authToken)
   137  
   138  ### HTTP request headers
   139  
   140  - **Content-Type**: Not defined
   141  - **Accept**: application/json
   142  
   143  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   144  [[Back to Model list]](../README.md#documentation-for-models)
   145  [[Back to README]](../README.md)
   146  
   147  
   148  ## ListUser
   149  
   150  > []ChatV2User ListUser(ctx, ServiceSidoptional)
   151  
   152  
   153  
   154  
   155  
   156  ### Path Parameters
   157  
   158  
   159  Name | Type | Description
   160  ------------- | ------------- | -------------
   161  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   162  **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User resources from.
   163  
   164  ### Other Parameters
   165  
   166  Other parameters are passed through a pointer to a ListUserParams struct
   167  
   168  
   169  Name | Type | Description
   170  ------------- | ------------- | -------------
   171  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   172  **Limit** | **int** | Max number of records to return.
   173  
   174  ### Return type
   175  
   176  [**[]ChatV2User**](ChatV2User.md)
   177  
   178  ### Authorization
   179  
   180  [accountSid_authToken](../README.md#accountSid_authToken)
   181  
   182  ### HTTP request headers
   183  
   184  - **Content-Type**: Not defined
   185  - **Accept**: application/json
   186  
   187  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   188  [[Back to Model list]](../README.md#documentation-for-models)
   189  [[Back to README]](../README.md)
   190  
   191  
   192  ## UpdateUser
   193  
   194  > ChatV2User UpdateUser(ctx, ServiceSidSidoptional)
   195  
   196  
   197  
   198  
   199  
   200  ### Path Parameters
   201  
   202  
   203  Name | Type | Description
   204  ------------- | ------------- | -------------
   205  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   206  **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User resource in.
   207  **Sid** | **string** | The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update.
   208  
   209  ### Other Parameters
   210  
   211  Other parameters are passed through a pointer to a UpdateUserParams struct
   212  
   213  
   214  Name | Type | Description
   215  ------------- | ------------- | -------------
   216  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
   217  **RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User.
   218  **Attributes** | **string** | A valid JSON string that contains application-specific data.
   219  **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is often used for display purposes.
   220  
   221  ### Return type
   222  
   223  [**ChatV2User**](ChatV2User.md)
   224  
   225  ### Authorization
   226  
   227  [accountSid_authToken](../README.md#accountSid_authToken)
   228  
   229  ### HTTP request headers
   230  
   231  - **Content-Type**: application/x-www-form-urlencoded
   232  - **Accept**: application/json
   233  
   234  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   235  [[Back to Model list]](../README.md#documentation-for-models)
   236  [[Back to README]](../README.md)
   237