Access private models through data api


(Improviz) #1

I've been working on dynamically pulling my collection models into my website, and I've got it working mostly as expected. However, I am not able to access the models that are private when using the /v3/collections/{uid}/models api.

How can I gain access to my private models through /v3/collections/{uid}/models or another api?


(Pierre-Antoine) #2

@improviz

Thanks for your feedback. We are aware of issues concerning private models in the API. We are working on improving this.
The best solution is to use the /v3/me/models endpoint here: https://docs.sketchfab.com/data-api/v3/index.html#!/models/get_v3_me_models

This endpoint should allow you to retrieve your private models.

We'll take your feedback into account to further improve the /v3/collections endpoint.

Let us know if that helps,

PA


(Improviz) #4

@pap
I was able to access all of my models with that endpoint, thanks. I guess I'll have to access them manually for now.

When looking at the data that comes back with the /v3/me/models endpoint, there isnt a property for isPrivate. Having this would be nice so that one could loop through the models and dynamically filter and refine the searches. This would probably be a little slow, but a handy feature nonetheless.

I have two requests for you:
1. Being able to somehow access private models through the /v3/collections/{uid}/model (already noted)
2. Have a isPrivate flag on the /v3/me/models api

Thanks,
Perry


(Pierre-Antoine) #5

@improviz thanks for your input.
I just added this two requests to our bug tracker. I don't have an ETA for now, but we'll keep you posted when they are fixed (I expect the isPrivate field to be quickly fixed).

/cc @james