github.com/twilio/twilio-go@v1.20.1/rest/verify/v2/docs/ServicesAccessTokensApi.md (about) 1 # ServicesAccessTokensApi 2 3 All URIs are relative to *https://verify.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateAccessToken**](ServicesAccessTokensApi.md#CreateAccessToken) | **Post** /v2/Services/{ServiceSid}/AccessTokens | 8 [**FetchAccessToken**](ServicesAccessTokensApi.md#FetchAccessToken) | **Get** /v2/Services/{ServiceSid}/AccessTokens/{Sid} | 9 10 11 12 ## CreateAccessToken 13 14 > VerifyV2AccessToken CreateAccessToken(ctx, ServiceSidoptional) 15 16 17 18 Create a new enrollment Access Token for the Entity 19 20 ### Path Parameters 21 22 23 Name | Type | Description 24 ------------- | ------------- | ------------- 25 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 26 **ServiceSid** | **string** | The unique SID identifier of the Service. 27 28 ### Other Parameters 29 30 Other parameters are passed through a pointer to a CreateAccessTokenParams struct 31 32 33 Name | Type | Description 34 ------------- | ------------- | ------------- 35 **Identity** | **string** | The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. 36 **FactorType** | **string** | 37 **FactorFriendlyName** | **string** | The friendly name of the factor that is going to be created with this access token 38 **Ttl** | **int** | How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60. 39 40 ### Return type 41 42 [**VerifyV2AccessToken**](VerifyV2AccessToken.md) 43 44 ### Authorization 45 46 [accountSid_authToken](../README.md#accountSid_authToken) 47 48 ### HTTP request headers 49 50 - **Content-Type**: application/x-www-form-urlencoded 51 - **Accept**: application/json 52 53 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 54 [[Back to Model list]](../README.md#documentation-for-models) 55 [[Back to README]](../README.md) 56 57 58 ## FetchAccessToken 59 60 > VerifyV2AccessToken FetchAccessToken(ctx, ServiceSidSid) 61 62 63 64 Fetch an Access Token for the Entity 65 66 ### Path Parameters 67 68 69 Name | Type | Description 70 ------------- | ------------- | ------------- 71 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 72 **ServiceSid** | **string** | The unique SID identifier of the Service. 73 **Sid** | **string** | A 34 character string that uniquely identifies this Access Token. 74 75 ### Other Parameters 76 77 Other parameters are passed through a pointer to a FetchAccessTokenParams struct 78 79 80 Name | Type | Description 81 ------------- | ------------- | ------------- 82 83 ### Return type 84 85 [**VerifyV2AccessToken**](VerifyV2AccessToken.md) 86 87 ### Authorization 88 89 [accountSid_authToken](../README.md#accountSid_authToken) 90 91 ### HTTP request headers 92 93 - **Content-Type**: Not defined 94 - **Accept**: application/json 95 96 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 97 [[Back to Model list]](../README.md#documentation-for-models) 98 [[Back to README]](../README.md) 99