Skip to content

Commit

Permalink
examples: init account accesses.
Browse files Browse the repository at this point in the history
  • Loading branch information
narekhovhannisyan committed Dec 9, 2023
1 parent 3bd2197 commit b8f0ec0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/general/account-accesses.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { MailtrapClient } from "../../src"

const TOKEN = "<YOUR-TOKEN-HERE>";
const TEST_INBOX_ID = "<YOUR-TEST-INBOX-ID-HERE>"
const ACCOUNT_ID = "<YOUR-ACCOUNT-ID-HERE>"

const client = new MailtrapClient({ token: TOKEN, testInboxId: TEST_INBOX_ID, accountId: ACCOUNT_ID });

const accountAccessesClient = client.general.accountAccesses

accountAccessesClient.listUserAndInviteAccountAccesses()
.then((result) => {
const firstResult = result[0]

return accountAccessesClient.removeAccountAccess(firstResult.id)
})
.catch(console.error)

0 comments on commit b8f0ec0

Please sign in to comment.