CORS Errors with Box UI Kit

新規投稿

コメント

12件のコメント

  • mschwartz

    Hello - thanks for reaching out! 

     

    It looks like there's an issue with the CORS allowed domains. Are the URLs entered as below (with your own localhost url, of course)? There should be a comma between the two values and no trailing slashes. 

     

    8019e67-Screen_Shot_2017-01-25_at_2.53.20_PM

    0
    コメントアクション パーマリンク
  • amenter

    Yes, the URLs are comma-separated and contain no trailing slashes.

     

    cbHF1N3

    0
    コメントアクション パーマリンク
  • mschwartz

    Thanks for sharing. We have not been able to replicate this issue. 

     

    In your CORS, can you please add https: in addition to http: for port 3267? Or, can you try using port 8080 instead? 

    0
    コメントアクション パーマリンク
  • amenter

    I added the domains with HTTPS to my allowed CORS domains, and also ran the project using port 8080. Unfortunately, the issue persists:

     

    gCanGgc

    0
    コメントアクション パーマリンク
  • mschwartz

    What is the token that you're using? The easiest way to test this is to use a Developer Token. You can generate this in the Box Developer Console. This token expires after 60 minutes, so if you're using an older token, you might need to refresh it. 

     

    Does that work?

    0
    コメントアクション パーマリンク
  • amenter

    I was using a token generated by OAuth. But even substituting this for a freshly generated developer token, the error does not change or go away. 

    0
    コメントアクション パーマリンク
  • amenter

    This issue unfortunate still persists. I noticed when I went back to my application settings that they seemed to have forgotten the allowed domains I had entered before. However, even upon entering the appropriate domains and clicking "save changes", the error persisted.

    0
    コメントアクション パーマリンク
  • Priyajeet

    Does your folder id / auth token combination work if you use it here https://codepen.io/box-platform/pen/PWPxBm. Replace the values shown in there and click Run on top. Don't save.

    0
    コメントアクション パーマリンク
  • amenter

    I'm afraid that produces the same 401 error, even though I have all relevant URLs within my allowed CORS Domains:

     

    cors domains.png

    0
    コメントアクション パーマリンク
  • Priyajeet

    Unfortunately that generally means that token you got is not working. Does the developer token (that you generate on the developer console's config page) work instead on that codepen?

    0
    コメントアクション パーマリンク
  • amenter

    I produced that 401 error by testing with the developer token I generated. It does not work.

    0
    コメントアクション パーマリンク
  • yamilquery

    You just need to revoke your current developer token and try with the new one!

     

    Enjoy!

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。