Loading...

DELETE   https://api.3seventy.com/api/v2.1/account/{accountId}/api-key/{keyId}

Description

Revoke an Api Key

Path Parameters

accountId integer An account which holds this Api Key. required
keyId integer An Api Key to revoke. required

C#


using System;
using System.Collections.Generic;
using System.Linq;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Models;

public class Program
{

private static void Main(string[] args)
{

const int accountId = XXX;

const int keyId = XXXX;

var context = new T70Context();

var apiKeyRepo = context.Repository<ApiKey>(new { AccountId = accountId });

var item = apiKeyRepo.Get(keyId);

apiKeyRepo.Delete(item);

}

}