Viewer API Pro and Enterprise Features - how to use API token?

The Viewer API includes options for hiding parts of the UI, with some of the features gated by which plan you have.

Which token do I include in the client-side Javascript for my app? (The API token is a secret and probably shouldn’t be shared with clients, right?) And where does a token get sent? In the client.init() call? The viewer API makes no mention of how to do authentication, and the Oauth page mentions a client_id that you receive when registering an app, but it’s unclear how this relates to the viewer API.

Viewer API apps do not require an API key; we check for permissions based on the plan that is attached to the model.

The oAuth authentication does require an API key which you can get by registering an app, but you’ll generally not need this unless your users need to sign in with their own Sketchfab account to upload models etc.

1 Like

Ah OK–I missed the part where the plan is tied to the model, not to the viewer. Thanks for your help!

2 Likes