import axios from "axios";
import docusign from "docusign-esign";
import fs from "fs";
import path from "path";
const getAccessToken = async () => {
const apiClient = new docusign.ApiClient();
apiClient.setOAuthBasePath("account-d.docusign.com");
const privateKey = fs.readFileSync(
path.join(process.cwd(), process.env.NEXT_PUBLIC_SIGNUP_CLIENT_SECRET || "")
);
const response = await apiClient.requestJWTUserToken(
process.env.NEXT_PUBLIC_SIGNUP_CLIENT_ID,
process.env.NEXT_PUBLIC_SIGNUP_USER_ID,
D"signature"],
privateKey,
3600
);
return response.body.access_token;
};
where i can find these issues?
tried to use this, but have error AUTHORIZATION_INVALID_TOKEN