I am trying and failing to access tables from Gdevelop’s “Send a request to a webpage” action.
The action form looks like this:
Naturally I am getting “401 Authentication required”, since I haven’t figured out where to place the PAT. I assume it goes somewhere in the URL, but where and in what format. Any help is much appreciated.
Best answer by TheTimeSavingCo
What I am getting back is “403 (Forbidden)”. Any idea of where I am going wrong?
Weird! 403 usually indicates an issue with the PAT / base ID, but you mentioned you managed to get it to work via Postman so that shouldn’t be an issue as you’re just copying it over. Sorry, I’m not really sure either
Here’s a version that I got working:
I’m not familiar with Gdevelop so apologies in advance, but I experienced some weirdness with the event’s interacting with each other I think and I couldn’t get it to work at all until I only had one event on the scene
Could you try creating a new scene with only one event and with ‘Any key is pressed’ and see whether that works?
=== P.S.: I have been able to get a proper response from within Postman. I am getting the entire table “LUT_units_dem”, the “?view=EXPORT-V1” parameter seems to be ignored though.
Hmm..I just tried renaming my view to be ‘EXPORT-V1’ and it only grabbed the records from that field. I created a new view called ‘EXPORT-V2’ to test it and that worked too!
Your level of supports warrants a bit of background and context.
I have been in game development since 1985, working in 68k assembly. Most of this “modern web stuff” is greek to me. Hence my choice of Gdevelop as a development platform - it’s so easy, a caveman could do it.
For me, my current project, “Energy is Life, Energy is Freedom” (EiLiF) is a work of passion. My goal is to develop EiLiF into a classroom tool that teaches about energy supply, demand and storage. The objective in EiLiF is to provide a local economy with reliable power and keep CO2 emissions to a minimum.
Long story short, I am writing the client side in Gdevelop and keep all unit data in Airtable. My current method of exporting from Airtable via .csv is cumbersome and error prone.
I have been aware of the “Advanced HTTP” extension for a while but couldn’t make heads or tail of it.
I reconstructed your directions in my code to the best of my ability. Yet success eludes me.
I’ll include the relevant code page. (There are no secrets here, anything critical will be locked down at a later date.)
I replaced the PATCH command with GET, since I am only reading from Airtable. I replaced the URL and added the Bearer PAT.
What I am getting back is “403 (Forbidden)”. Any idea of where I am going wrong?
P.S.: I have been able to get a proper response from within Postman. I am getting the entire table “LUT_units_dem”, the “?view=EXPORT-V1” parameter seems to be ignored though.
What I am getting back is “403 (Forbidden)”. Any idea of where I am going wrong?
Weird! 403 usually indicates an issue with the PAT / base ID, but you mentioned you managed to get it to work via Postman so that shouldn’t be an issue as you’re just copying it over. Sorry, I’m not really sure either
Here’s a version that I got working:
I’m not familiar with Gdevelop so apologies in advance, but I experienced some weirdness with the event’s interacting with each other I think and I couldn’t get it to work at all until I only had one event on the scene
Could you try creating a new scene with only one event and with ‘Any key is pressed’ and see whether that works?
=== P.S.: I have been able to get a proper response from within Postman. I am getting the entire table “LUT_units_dem”, the “?view=EXPORT-V1” parameter seems to be ignored though.
Hmm..I just tried renaming my view to be ‘EXPORT-V1’ and it only grabbed the records from that field. I created a new view called ‘EXPORT-V2’ to test it and that worked too!
Would you mind updating the thread or DMing me when the game’s in alpha or something? Would be interested in trying it! That tile based system looks really well done by the way!