I have run into 2 issues with my Custom App
Auth Method: OAuth 2.0 with Client Credentials Grant (Server Authentication)
App Access Level: App+Enterprise Access
Client id: ssunxw71at2t90vqe0m0goaj3ya6ol7h
1. Cannot get token associated with the user id
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=ssunxw71at2t90vqe0m0goaj3ya6ol7h" \
-d "client_secret=6*******************z" \
-d "grant_type=client_credentials" \
-d "box_subject_type=user" \
-d "box_subject_id=19622242709"
Error message: {"error":"invalid_grant","error_description":"Grant credentials are invalid"}
Then I changed to authenticate through enterprise id, replacing the last two lines with
-d "box_subject_type=enterprise" \
-d "box_subject_id=906015826"
I did get a token back that way. But why it failed through the user?
2. Cannot get any folder or item with token obtained through the enterprise id
FOLDER_ID='165911621075'
{"type":"error","status":404,"code":"not_found","help_url":"http:\/\/developers.box.com\/docs\/#errors","messag
e":"Not Found","request_id":"f07bwyh5z1f62o2o"}
# try getting the file directly
{"type":"error","status":404,"code":"not_found","help_url":"http:\/\/developers.box.com\/docs\/#errors","messag
e":"Could not find the specified resource","request_id":"fwrqlyh5z21n3ztv"}
Please help!
Thanks,
Al