box-api

2 Legged Flow for service account authentication BOX

纵饮孤独 提交于 2020-01-05 09:53:11
问题 Is there any way for going around the login page required after getting a BOX token. I need to use the BOX account as an admin so is there any workaround so that it can be done programatically. 回答1: If by the login page you're referring to the credentials page at: https://www.box.com/api/1.0/auth/{your ticket} that you redirect the user to after getting a ticket from: GET https://www.box.com/api/1.0/rest?action=get_ticket&api_key={your api key} Then the answer is currently no. As far as I

Access-Control-Allow-Origin error when making a HTTP request

喜欢而已 提交于 2020-01-04 14:09:04
问题 Hi I'm in the process of authenticating a user via OAuth 2.0 and I'm getting a Access-Control-Allow-Origin error ( XMLHttpRequest cannot load https://www.box.com/api/oauth2/token. Origin http://localhost is not allowed by Access-Control-Allow-Origin. ) when making the following POST request: var xhr=new XMLHttpRequest(); xhr.open('POST',path,true); xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xhr.onload = function() { var text = xhr.responseText; alert('Response

Access-Control-Allow-Origin error when making a HTTP request

纵饮孤独 提交于 2020-01-04 14:06:51
问题 Hi I'm in the process of authenticating a user via OAuth 2.0 and I'm getting a Access-Control-Allow-Origin error ( XMLHttpRequest cannot load https://www.box.com/api/oauth2/token. Origin http://localhost is not allowed by Access-Control-Allow-Origin. ) when making the following POST request: var xhr=new XMLHttpRequest(); xhr.open('POST',path,true); xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xhr.onload = function() { var text = xhr.responseText; alert('Response

Authentication from desktop app

社会主义新天地 提交于 2020-01-02 14:01:46
问题 I'm building a windows service that would upload files to Box.com under some conditions. How can I authenticate without having the user go to a webpage and enter the username and password ? I can't seem to find the details in the documentation. thanks. 回答1: At the moment, you have two options. You can sign up for the 'instant mode' beta that gets you an authentication token via the /tokens V2 API endpoint, but limits you to accessing a single folder in the user's account. You can use the V1

Box API token request enterprise configuration issue

放肆的年华 提交于 2019-12-30 09:53:36
问题 I am making a call to https://api.box.com/oauth2/token to get a token for a user . I get a 400 with the following error: Cannot obtain token based on the enterprise configuration for your app I don't see this error message defined anywhere. Any ideas what I'm doing wrong? 回答1: The issue here was that I was requesting a token for a non app user and my application was configured to allow access to app users only. 来源: https://stackoverflow.com/questions/33683246/box-api-token-request-enterprise

Box API token request enterprise configuration issue

喜欢而已 提交于 2019-12-30 09:53:26
问题 I am making a call to https://api.box.com/oauth2/token to get a token for a user . I get a 400 with the following error: Cannot obtain token based on the enterprise configuration for your app I don't see this error message defined anywhere. Any ideas what I'm doing wrong? 回答1: The issue here was that I was requesting a token for a non app user and my application was configured to allow access to app users only. 来源: https://stackoverflow.com/questions/33683246/box-api-token-request-enterprise

Box API token request enterprise configuration issue

馋奶兔 提交于 2019-12-30 09:53:11
问题 I am making a call to https://api.box.com/oauth2/token to get a token for a user . I get a 400 with the following error: Cannot obtain token based on the enterprise configuration for your app I don't see this error message defined anywhere. Any ideas what I'm doing wrong? 回答1: The issue here was that I was requesting a token for a non app user and my application was configured to allow access to app users only. 来源: https://stackoverflow.com/questions/33683246/box-api-token-request-enterprise

Box.api oauth2 acces token request error “Invalid grant_type parameter or parameter missing” when using POSTMAN

雨燕双飞 提交于 2019-12-30 07:29:09
问题 The documentation (http://developers.box.com/oauth/) suggests using POSTMAN or curl. in this example, the clientID is 123, secret code is 456 and so on. I am using Postman. In a prior step, I have obtained an access code via: https://www.box.com/api/oauth2/authorize?response_type=code&client_id=123 let's say the response is xyz In the next step, I use POSTMAN to issue a POST command (urlencoded) https://www.box.com/api/oauth2/token?grant_type=authorization_code&client_id=123&client_secret=456

Box API upload files to admin account instead of APP

我与影子孤独终老i 提交于 2019-12-25 15:55:20
问题 Hey I use the Box API and I successfull to upload my files but they are stored at the app storage folder. If you would go to the admin-console and then click the folder Icon you can see the admin folder and then the folder of the created app. How can I change the path that every upload will go to the admin folder that if I relog to box.com I would see all my files in the home folder instead of going to the admin-console every time? 回答1: This should work. var client = sdk.getAppAuthClient(

Box API upload files to admin account instead of APP

江枫思渺然 提交于 2019-12-25 15:54:51
问题 Hey I use the Box API and I successfull to upload my files but they are stored at the app storage folder. If you would go to the admin-console and then click the folder Icon you can see the admin folder and then the folder of the created app. How can I change the path that every upload will go to the admin folder that if I relog to box.com I would see all my files in the home folder instead of going to the admin-console every time? 回答1: This should work. var client = sdk.getAppAuthClient(