Unable to re-authorize
回答済みHi All,
I'm just starting to play around with the API, and I was going great guns until my request to refresh the access token (via Postman, in this case) told me that the client credentials were invalid. Some searching around revealed that I needed to re-authorize. I attempted to do so by going to https://account.box.com/api/oauth2/authorize?response_type=code&client_id=[MY_CLIENT_ID]. After logging in, and clicking "Grant access to Box", I get the loading spinner—and that's it. It continues to spin ad infinitum.
I've tried this with Chrome and Safari (on Mac) with the same results. Any suggestions?
Thanks in advance,
Mark Pemburn
Trak Software
-
正式なコメント
Hi Mark,
Do you have a client_id I can look up on my end? I tried to look it up based on your email, but the enterprise tied to this support post is a free developer account with no applications.
Thanks,
Alex, Box Developer Advocate
コメントアクション -
Oh also (if you don't mind): I pulled in the Postman environment from your Guides, and the headers for the access token requests include a Bearer token in the Authorization header, and a box_visitor_id in the Cookie header. I have no idea where these come from, or whether they can be saved for my configuration. Can you clue me? Thanks!
-
Hi Alex,
That worked—thank you!
I was wondering though, how do I translate this into my Laravel-based app environment? My hope is that all of this can be done completely transparently to the user. Our vision is that our users can go into our app, click on "Files from Box" and get a dialog that shows them their folders and files. They would navigate to the appropriate folder and select one or more file which would then be automatically copied to our database. I've done a proof-of-concept on most of this and it will work as described.
The big thing is either to allow us to connect our app to the user's corporate Box account or, ideally, allow individual users to to connect their Box account to their user profile. Better still, they could do both.
So, my question is essentially, is what I outline above possible and, if so, where do go to find a roadmap to this kind of integration?
Best regards,Mark
-
Morning Mark,
We don't really have roadmaps for every specific kind of integration you can build. That being said, you could follow this guide for doing what you did in postman in an actual application re: OAuth 2.0 authentication. I will say that going that OAuth route will require a user to know you are connecting to Box/using Box at all. This guide goes over our different authentication types and what their user experiences are. If you don't want a user to know you are using Box, JWT will be the best bet. You can also create what are called app users with JWT apps, essentially a user account that can store content for a user in a custom application.
Hope this helps!
Thanks,
Alex, Box Developer Advocate
サインインしてコメントを残してください。
コメント
8件のコメント