This topic was automatically generated from Slack. You can find the original thread here.
Can you try prepending x-pd-proxy-
in the Accept
header? So,
-H "x-pd-proxy-Accept: application/json"
Not sure if that’s the issue, but that’s how you signal to the Connect proxy that we should forward that header to the upstream API: GitHub
will do, one moment
didn’t work, same problem.
is there a way to get some visibility about what the proxy is sending to facebook? as far as i can tell, i’m encoding and formatting the call correctly, but something is making facebook return this response
Can you try again? I just tested this and got expected JSON:
const resp = await pd.makeProxyRequest(
{
searchParams: {
external_user_id: process.env.EXTERNAL_USER_ID,
account_id: process.env.ACCOUNT_ID
}
},
{
url: "https://graph.facebook.com/v17.0/me/",
options: {
method: "GET",
},
}
);
➜ makeRequest node makeProxyRequest.mjs
{
"name": "Danny Roosevelt",
"id": "10111652521669997"
}
Is the fields
param correctly formatted? Decoded:
id,title,created_time,live_status,length,from{id,nAme},permalink_url
i redid the base64 encoding on my code and now it works! thanks
Nice, no problem. Btw maybe you saw, but the SDK handles the base64 encoding — I assume you’re using a different lang / framework than JS and that’s why you’re using the REST API?
Yup, i’m on python. Thanks a lot for the help!
No problem, we plan on publishing a python SDK soon!