Can't Get Authorization Code
回答済みHello,
I'm a newcomer to BOX, and I get some problem now, hope to get some assist;
My case is when I want to get AUTHORIZATION CODE through BOX api with Java,
I send a http request to 'https://account.box.com/api/oauth2/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&state=security_token%3DKnhMJatFipTAnM0nHlZA',and I changed client_id, redirect_uri with my configue, but the response I got is never like this :
?code=;
-
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
-
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
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~
-
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,
-
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
サインインしてコメントを残してください。
コメント
7件のコメント