Help Downloading glTF From Script


(Andywanggd) #1

Hi everyone,

I am currently using Unity 2018, and am trying to figure out the basic setup for downloading a glTF model in C#.

I tried looking at the ‘Sketchfab For Unity’ plugin scripts, but as someone new to the API scene, I would like some guidance. High level steps or pseudo code would be greatly appreciated.

I have a specific model UID (which I believe is taken from the link to the model, right?), and can’t figure out how to make an API call that will download a glTF file.

From I have currently gathered:

  1. I need to have an oauth token
  2. I need to make a GET request to https://api.sketchfab.com/v3/models/294e79652f494130ad2ab00a13fdbafd/download

but… I don’t know how to add an authorization header

Thanks for your time.