Get stuck on the login Form of SketchFab for get the code


(4535993) #1

Hi, i just started using skectfab i'm trying to het the token for work with the API but i failed, i follow the step on the guide to the url: oauth , so these are the steps

  1. Your app displays a "Sketchfab Login" link:[CLIENT_ID]&redirect_uri=[REDIRECT_URI]
  2. User clicks on then link
  3. User is prompted to authorize your app
  4. User is redirected back to your site with an authorization code:

But i'm stuck to the point 3 when i click on login form of sketchfab after set username and password nothing happened , there is not returning post to my redirecturi , just to be clarify i know for sure my page exists and is reachable (i'm not on localhost) and i'm working with a site and the redirecturi point to a aspx file for receive the post from sketchfab.

Any idea on what i'm doing wrong?
Ty in advance.



Did you register an app with us already?

(4535993) #3

Yes , i send an email at the support sketchfab with a name for the App, a redirecturi and the type of authorization and receive a response with a client_id and a client_secret.


Is there any console error after you login?

(4535993) #5

No error, the only thing is a post call with command: POST 204 No Content
but i don't get it why, i just make a GET call for use the form authentication like described in the documentation of oauth,
Here the full json response if you can find it useful: json response

(4535993) #6

Add the question of this topic to stackoverflow with the code i use if anyone is interested or encounter the same problem.
link to stackoverflow question

(Arthur Jamain) #7

Hey there !

There doesn't seem to be anything wrong with what you are doing, based on your posts. I'm going to need a few more details in order to find something interesting.

Any or all of the following will help me greatly :

  • Take a screenshot of the last screen you see before everything gets stuck (including the URI)
  • Take a screenshot of the "network" panel of your inspector (please expand columns if possible) ; please ensure it was opened as soon as possible when landing on the page, before doing anything else
  • Double-check the console for any errors

Don't pay attention to the POST you've mentioned, it's something else entirely.

Meanwhile i'll look for more clues with James.


-- Arthur J
dev @ Sketchfab

(4535993) #8

Hello, thanks for the answers, I’am attaching images related to the state before the GET call after, the GET call and after trying to enter credentials on the form received, both for firefox and for chrome
I put the html code returned from the sketchfab either .Console double checked with chrome and firefox.
Greetings. (376.6 KB)

(Arthur Jamain) #9

Hey there,

Sorry for my late followup, things have been busy around here.

I don't think I entirely understand your situation as aspx unfortunately mostly unknown to me. However, I suspect that the sketchfab login form being served on an aspx page (unless it's an iframe but it doesn't look like it) is part of the issue here. I'm not sure how resilient our page is to being proxified.

Another thing I seem to notice is that in your screenshot after you have clicked the login button, there doesn't seem to be a login xhr in the network panel. This would indicate that the DOM events are not properly processed for some reason.

Unless you have a specific reason to implement your current workflow, I would suggest a more standard approach to Oauth2 (e.g. redirect the user to our domain, with a callback URI to yours once we have processed his login query).

Hope this was at least a bit helpful ; I can't find much more information without a case to reproduce :confused:

I'll stay available for more discussion if needed.


(4535993) #10

Hello, after having tried everything-side code, and any HTTP GET call with c # and .net , the form of sketchfab fail everytime on the authentication form of the app and does an infinite loading after insert the username and the password anc click on the submit button, it appears to me
it doesn't find the redirect site for some reasons. I gave it to work and "obligate" the customer to click on this piece of html code
<form id="form1" runat="server">
<a href="[CLIENT_ID]&redirect_uri=[REDIRECT_URI]">Login</a>

Now i get the response uri with the code parameter i need to get a token like on the documentation:

when making a POST request to with the code i retrieve , the sketchfab server return a 405 error "this method is not allowed from the server" , is a HTTP POST Right? or i'm doing something wrong again? I check out all the parameters of the post and it's seems all right, there is some headers or authorization i need to specify or is the same issue of the GET call and must use a html form for make it work?

Here a the code example c# i use: C# code use for simple post to sketchfab request token

(4535993) #11

Solved. it was the code of the project it's remove the last caracther '/' of the authorization uri , sketchfab structure it's wasn't envolved on this issue. Sorry for that.