createActorTokenWithHttpInfo method

Future<Response> createActorTokenWithHttpInfo({
  1. CreateActorTokenRequest? createActorTokenRequest,
})

Create actor token

Create an actor token that can be used to impersonate the given user. The actor parameter needs to include at least a "sub" key whose value is the ID of the actor (impersonating) user.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<http.Response> createActorTokenWithHttpInfo({
  CreateActorTokenRequest? createActorTokenRequest,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/actor_tokens';

  // ignore: prefer_final_locals
  Object? postBody = createActorTokenRequest;

  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,
  );
}