createSignInTokenWithHttpInfo method

Future<Response> createSignInTokenWithHttpInfo({
  1. CreateSignInTokenRequest? createSignInTokenRequest,
})

Create sign-in token

Creates a new sign-in token and associates it with the given user. By default, sign-in tokens expire in 30 days. You can optionally supply a different duration in seconds using the expires_in_seconds property.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<http.Response> createSignInTokenWithHttpInfo({
  CreateSignInTokenRequest? createSignInTokenRequest,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/sign_in_tokens';

  // ignore: prefer_final_locals
  Object? postBody = createSignInTokenRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}