新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

Can't Get Authorization Code

回答済み
新規投稿

コメント

7件のコメント

  • LoCortes

    Hello ,

    welcome to the forum 🙂

     

    I understand you are following this guide https://docs.box.com/docs/oauth-20 and trying to authenticate with named users.

     

    Have you followed all the steps indicated there? Can you share what you receive as a response?

     

    Thank you

    0
    コメントアクション パーマリンク
  • Box Product Support

    Thanks for your reply.

    My first step is send a http get request to 

    https://account.box.com/api/oauth2/authorize?response_type=code&client_id=&redirect_uri=&state=>

    with httpclient in Java,  my redirect_uri is https://app.box.com/, and I got a html page as reponse which

    leads me to login as show below

    2.PNG

    I wonder whether this is the right reponse.

    While, I tried to access box with my developer token which succeed, and now I'm not quite understand the difference between developer token and access token. Is developer token just used for tests?

     

    Thank you very much~ 

     

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

    Hello ,

     

    yeah, that's right accordingly to https://developer.box.com/docs/oauth-20. As indicated: "After successfully entering their credentials, the user will be taken to a consent page, to authorize your application to access their account. After clicking either Grant or Deny, you’ll receive a response from Box, as outlined in the next section." 

     

    So, you will receive an authorization code that is what your application will use.

     

    Regards,

     

    0
    コメントアクション パーマリンク
  • Box Product Support

    Thanks ,

    I got the point, But what I really want is to get the authorization code directly for further use in my Java application. Could you give me some advice on how to realize it? and could you tell me more about the 

    difference between the developer token and access token? 

     

    Regards,

     

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

    Hello ,

    to be sincere, all development I have done has been based on Two-legged OAUTH with JWT and used App Users instead of Managed Users (https://developer.box.com/docs/app-auth)

     

    Maybe that would suit better to you also 🙂

     

    Regards

    0
    コメントアクション パーマリンク
  • Box Product Support

    Thanks ,

    I see. I will trun my focus on JWT.

    Thanks for your kindness, I really appreciate it.

     

    Regards

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

    Hello !

     

    a pleasure 😉

     

    Regards

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

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