github.com/twilio/twilio-go@v1.20.1/rest/verify/v2/docs/ServicesEntitiesChallengesApi.md (about) 1 # ServicesEntitiesChallengesApi 2 3 All URIs are relative to *https://verify.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateChallenge**](ServicesEntitiesChallengesApi.md#CreateChallenge) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | 8 [**FetchChallenge**](ServicesEntitiesChallengesApi.md#FetchChallenge) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | 9 [**ListChallenge**](ServicesEntitiesChallengesApi.md#ListChallenge) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | 10 [**UpdateChallenge**](ServicesEntitiesChallengesApi.md#UpdateChallenge) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | 11 12 13 14 ## CreateChallenge 15 16 > VerifyV2Challenge CreateChallenge(ctx, ServiceSidIdentityoptional) 17 18 19 20 Create a new Challenge for the Factor 21 22 ### Path Parameters 23 24 25 Name | Type | Description 26 ------------- | ------------- | ------------- 27 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 28 **ServiceSid** | **string** | The unique SID identifier of the Service. 29 **Identity** | **string** | Customer unique identity for the Entity owner of the Challenge. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters. 30 31 ### Other Parameters 32 33 Other parameters are passed through a pointer to a CreateChallengeParams struct 34 35 36 Name | Type | Description 37 ------------- | ------------- | ------------- 38 **FactorSid** | **string** | The unique SID identifier of the Factor. 39 **ExpirationDate** | **time.Time** | The date-time when this Challenge expires, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation. 40 **DetailsMessage** | **string** | Shown to the user when the push notification arrives. Required when `factor_type` is `push`. Can be up to 256 characters in length 41 **DetailsFields** | **[]interface{}** | A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field, the label can be up to 36 characters in length and the value can be up to 128 characters in length. Used when `factor_type` is `push`. There can be up to 20 details fields. 42 **HiddenDetails** | [**interface{}**](interface{}.md) | Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\\\"ip\\\": \\\"172.168.1.234\\\"}`. Can be up to 1024 characters in length 43 **AuthPayload** | **string** | Optional payload used to verify the Challenge upon creation. Only used with a Factor of type `totp` to carry the TOTP code that needs to be verified. For `TOTP` this value must be between 3 and 8 characters long. 44 45 ### Return type 46 47 [**VerifyV2Challenge**](VerifyV2Challenge.md) 48 49 ### Authorization 50 51 [accountSid_authToken](../README.md#accountSid_authToken) 52 53 ### HTTP request headers 54 55 - **Content-Type**: application/x-www-form-urlencoded 56 - **Accept**: application/json 57 58 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 59 [[Back to Model list]](../README.md#documentation-for-models) 60 [[Back to README]](../README.md) 61 62 63 ## FetchChallenge 64 65 > VerifyV2Challenge FetchChallenge(ctx, ServiceSidIdentitySid) 66 67 68 69 Fetch a specific Challenge. 70 71 ### Path Parameters 72 73 74 Name | Type | Description 75 ------------- | ------------- | ------------- 76 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 77 **ServiceSid** | **string** | The unique SID identifier of the Service. 78 **Identity** | **string** | Customer unique identity for the Entity owner of the Challenges. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters. 79 **Sid** | **string** | A 34 character string that uniquely identifies this Challenge. 80 81 ### Other Parameters 82 83 Other parameters are passed through a pointer to a FetchChallengeParams struct 84 85 86 Name | Type | Description 87 ------------- | ------------- | ------------- 88 89 ### Return type 90 91 [**VerifyV2Challenge**](VerifyV2Challenge.md) 92 93 ### Authorization 94 95 [accountSid_authToken](../README.md#accountSid_authToken) 96 97 ### HTTP request headers 98 99 - **Content-Type**: Not defined 100 - **Accept**: application/json 101 102 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 103 [[Back to Model list]](../README.md#documentation-for-models) 104 [[Back to README]](../README.md) 105 106 107 ## ListChallenge 108 109 > []VerifyV2Challenge ListChallenge(ctx, ServiceSidIdentityoptional) 110 111 112 113 Retrieve a list of all Challenges for a Factor. 114 115 ### Path Parameters 116 117 118 Name | Type | Description 119 ------------- | ------------- | ------------- 120 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 121 **ServiceSid** | **string** | The unique SID identifier of the Service. 122 **Identity** | **string** | Customer unique identity for the Entity owner of the Challenge. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters. 123 124 ### Other Parameters 125 126 Other parameters are passed through a pointer to a ListChallengeParams struct 127 128 129 Name | Type | Description 130 ------------- | ------------- | ------------- 131 **FactorSid** | **string** | The unique SID identifier of the Factor. 132 **Status** | **string** | The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. 133 **Order** | **string** | The desired sort order of the Challenges list. One of `asc` or `desc` for ascending and descending respectively. Defaults to `asc`. 134 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 135 **Limit** | **int** | Max number of records to return. 136 137 ### Return type 138 139 [**[]VerifyV2Challenge**](VerifyV2Challenge.md) 140 141 ### Authorization 142 143 [accountSid_authToken](../README.md#accountSid_authToken) 144 145 ### HTTP request headers 146 147 - **Content-Type**: Not defined 148 - **Accept**: application/json 149 150 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 151 [[Back to Model list]](../README.md#documentation-for-models) 152 [[Back to README]](../README.md) 153 154 155 ## UpdateChallenge 156 157 > VerifyV2Challenge UpdateChallenge(ctx, ServiceSidIdentitySidoptional) 158 159 160 161 Verify a specific Challenge. 162 163 ### Path Parameters 164 165 166 Name | Type | Description 167 ------------- | ------------- | ------------- 168 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 169 **ServiceSid** | **string** | The unique SID identifier of the Service. 170 **Identity** | **string** | Customer unique identity for the Entity owner of the Challenge. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters. 171 **Sid** | **string** | A 34 character string that uniquely identifies this Challenge. 172 173 ### Other Parameters 174 175 Other parameters are passed through a pointer to a UpdateChallengeParams struct 176 177 178 Name | Type | Description 179 ------------- | ------------- | ------------- 180 **AuthPayload** | **string** | The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. For `TOTP` this value must be between 3 and 8 characters long. For `Push` this value can be up to 5456 characters in length 181 **Metadata** | [**interface{}**](interface{}.md) | Custom metadata associated with the challenge. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. `{\\\"os\\\": \\\"Android\\\"}`. Can be up to 1024 characters in length. 182 183 ### Return type 184 185 [**VerifyV2Challenge**](VerifyV2Challenge.md) 186 187 ### Authorization 188 189 [accountSid_authToken](../README.md#accountSid_authToken) 190 191 ### HTTP request headers 192 193 - **Content-Type**: application/x-www-form-urlencoded 194 - **Accept**: application/json 195 196 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 197 [[Back to Model list]](../README.md#documentation-for-models) 198 [[Back to README]](../README.md) 199