Aladin SALEH
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Downloads
Gallery
Posts posted by Aladin SALEH
-
-
26 minutes ago, Melanie Lisle said:
Hi,
Which Sage product are you attempting to connect to?
Thanks,
Mel
I'm attempting to connect to Sage 50 .
Aladin -
Hello,
I'm trying to create a web application using sage.
So I created a nodejs application (Oauth2 authentication server) to be able to make requests.
But I don't know why when I try to authenticate myself the server refuses me access.
I have admins rights
I don't know where this error comes from.
I have searched all afternoon in the documentation but nothing 😕
I hope someone could help me.
Here is my code of my nodejs server
const express = require('express');const app = express();const path = require('path');const fs = require('fs');const https = require('https');const axios = require('axios');const PORT = 3443;const clientID ='<myclientid>';const clientSecret ='<myclientsecret>';app.use(express.static(__dirname + '/public'))app.get('/callback', (req, res) => {const requestToken = req.query.codeconsole.log(req.query.code);axios({method: 'post',url:`https://oauth.accounting.sage.com/token&grant_type=authorization_code&code=${requestToken}client_id=${clientID}&client_secret=${clientSecret}&redirect_uri=https://localhost:3443/callback`,headers: {accept: 'application/json',}}).then((response) => {const accessToken = response.data.access_token;console.log(accessToken);res.redirect(`/welcome.html?access_token=${accessToken}`)})})const sslServer = https.createServer({key:fs.readFileSync(path.join(__dirname,'cert','localhost.key')),cert:fs.readFileSync(path.join(__dirname,'cert','localhost.crt'))},app);sslServer.listen(PORT,()=>console.log('Adresse : https://localhost:3443/ \nServeur SSL : port : ' + PORT)); -
'x-amzn-errortype': 'MissingAuthenticationTokenException','x-cache': 'Error from cloudfront',
in General
Posted
Hi,
Can someone tell me why I get this message when I try to get an access token :
'x-cache': 'Error from cloudfront',
'x-amzn-errortype': 'MissingAuthenticationTokenException',
statusCode: 403,
statusMessage: 'Forbidden',
I've already check my rights (admin)
I have searched everywhere but have not found anything.
So if someone have aleady encounter this issue, please tell me how to solve it.
Aladin SALEH