Closed delebash closed 4 days ago
I think the problem is from the refer using localhost. I changed to using axios while I was troubleshooting the problem but that did not fix it. I ran a node test app and the request still failed with 403. However, when I did the same request from the main.js in an Electron project it worked fine. Here is my complete axios request just fyi.
import axios from 'axios'
import * as https from "node:https";
let axiosRequest = {
url: 'https://www.fab.com/e/accounts/accountid/ue/library?count=100',
method: 'GET',
headers: {
'Host': 'www.fab.com',
'User-Agent': 'UELauncher/17.0.2-37848679+++Portal+Release-Live Windows/10.0.22631.1.768.64bit',
'Authorization': 'Bearer eg.....'
},
httpAgent: new https.Agent({ rejectUnauthorized: false, noDelay: true, path: null }),
signal: new AbortController().signal,
timeout: 0,
maxRedirects: 21,
withCredentials: false
}
let response = await axios(axiosRequest)
console.log('response', response.data)
Nice work on this. I made an electron version of an unreal vault organizer and used a sniffer to get the unreal vault token but your login process is much better. I was looking at making this work for fab but I am running into some issues. So I ran fiddler sniffer to see the new asset urls. It looks like
https://www.fab.com/e/accounts/your account id/ue/library?count=100
works. I used postman and added the auth key generated from your program. Your auth method still works. I got the expected data for assets in the ue vault.and so on.
I am having problems making the above get request in code. When making the get node-fetch request to
https://www.fab.com/e/accounts/your account id/ue/library?count=100
with all the necessary headers I keep getting a 403 error. I even tried the request using python just to make sure it was not a node-fetch issue.Example python
I have tested with 3 different api test programs and they all successfully completed the get request. Postman, HttpToolkit, and WebMaestro. I grabbed the exact headers that Postman was sending and used them in my code. I can't figure out why the api testing programs work and my code doesn't. Maybe some type of cloudflare protection but if the api testers work than we should be able to replicate that from code. Of course I could just be missing something simple, so if you have time to look at getting this working with fab that would be awesome. Cheers!