mirror of
https://github.com/Tribufu/TribufuJS
synced 2026-08-09 04:41:06 +00:00
Bearer token auth draft
This commit is contained in:
parent
26dbeb6867
commit
43b5a53520
4 changed files with 56 additions and 8 deletions
15
examples/bearer.js
Normal file
15
examples/bearer.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT AND Apache-2.0
|
||||
|
||||
import dotenv from "dotenv";
|
||||
import { TribufuApi } from "../build/index.mjs";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
async function main() {
|
||||
const accessToken = process.env["TRIBUFU_ACCESS_TOKEN"];
|
||||
const tribufu = TribufuApi.withAccessToken(accessToken);
|
||||
console.log(await tribufu.getUserInfo());
|
||||
}
|
||||
|
||||
main();
|
||||
Loading…
Add table
Add a link
Reference in a new issue