You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try {
const NIAPIKEY = 'your_api_key_here'; // Fill in your actual API key
const tokenResponse = await fetch(networkPayPayAccessTokenUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/vnd.ni-identity.v1+json',
'Authorization': Basic ${NIAPIKEY},
},
// No need for body if no data is being sent
});
<!i am making post request to payment gate way with no body using default import of node. ES6 -->
Reproduction
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
const genrateNiAccessToken = async () => {
const NIPAYMENTGATEWAYURL = 'https://api-gateway.ngenius-payments.com';
const networkPayPayAccessTokenUrl =
${NIPAYMENTGATEWAYURL}/identity/auth/access-token
;try {
const NIAPIKEY = 'your_api_key_here'; // Fill in your actual API key
const tokenResponse = await fetch(networkPayPayAccessTokenUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/vnd.ni-identity.v1+json',
'Authorization':
Basic ${NIAPIKEY}
,},
// No need for body if no data is being sent
});
} catch (error) {
console.error("Error fetching token:", error);
return null;
}
};
genrateNiAccessToken();
Steps to reproduce the behavior:
Expected behavior
Screenshots
Node JS
Additional context
The text was updated successfully, but these errors were encountered: