Forum Discussion

Rizzo's avatar
Rizzo
New member | Level 2
8 years ago

Endpoint /token reponse with content-type "text/javascript"

My app is using the authorization code flow, so after getting auth. code its requesting access token through token endpoint, Its returning a response with json content: "{ access_token: ... }", but content-type header is "text/javascript",  is it right? Thanks in advance

 

    • Rizzo's avatar
      Rizzo
      New member | Level 2

      What do you mean? :thinking:

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    We do still return the older "text/javascript" by default for historical reasons, in order to not break old integrations.

    If you send the "Accept: application/json" request header though, you'll get "application/json" instead.