Hi,
I've been trying to start creating a pipeline for managing files and folders in Box using the Box API. I am having some problems.
I have done the following....
- Created an App based on OAuth 2.0 (user or client authentication)
- Setup a redirect uri for the App based on my company's Box homepage:
https://XXX.XXX.box.com/auth/callback
- Copied the client id / client secret and used the App's client id / client secret to generate a Bearer token using:
curl -i -X POST "https://api.box.com/oauth2/token" -H "Content-Type: application/x-www-form-urlencoded" -d "client_id=XXXXXXX" -d "client_secret=XXXXX" -d "grant_type=client_credentials"
- Copied the Bearer token generated and then used the Bearer token in API calls:
curl -i -X GET "https://api.box.com/2.0/events" -H "Authorization: Bearer ZZZZZZZZZ"
However now I get errors:
{"type":"error","status":400,"code":"bad_request","context_info":{"errors":[{"reason":"invalid_parameter","name":"user","message":"Invalid value 'Box_Anonymous_User 2'."}]},"help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Bad Request","request_id":"lsnrcsgq24dqcxgu"}
Any idea what I am doing incorrectly?
Is my App maybe setup incorrectly?
If there is a blog or guide to setting up API pipelines with the Box API please feel free to share them :-)
Any help most appreciated!
Thanks, Nick