download
raw
724 Bytes
import { OAuth2Client } from "../client.js";
const authorizationEndpoint = "https://api.notion.com/v1/oauth/authorize";
const tokenEndpoint = "https://api.notion.com/v1/oauth/token";
export class Notion {
client;
constructor(clientId, clientSecret, redirectURI) {
this.client = new OAuth2Client(clientId, clientSecret, redirectURI);
}
createAuthorizationURL(state) {
const url = this.client.createAuthorizationURL(authorizationEndpoint, state, []);
url.searchParams.set("owner", "user");
return url;
}
async validateAuthorizationCode(code) {
const tokens = await this.client.validateAuthorizationCode(tokenEndpoint, code, null);
return tokens;
}
}

Xet Storage Details

Size:
724 Bytes
·
Xet hash:
92c991aba33e1b5a2c9cfa350de0b93795ca9216e34579cc058c9d87bad64d9c

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.