API access as collaborating external user still getting 404 errors?

新規投稿

コメント

11件のコメント

  • Kourtney

    Hello again ! 

     

    The d_value you're seeing in the error message should match the folder Id you're passing in your call. In this case, it looks like you made this call using the token of your JWT service account (AutomationUser).  You can verify by using the get current user call. However, it still doesn't look like this user has been granted collaboration access to this content, hence why you're receiving a 404 not found. The service account can only "find" content its been granted access to through either: being the owner or being a collaborator. 

     

    If you add this user as a collaborator on the folder and still receive an error, please provide me with the full body response that includes the request ID and date/time/timezone you received the error so I can take another look in the backend. 

     

    If you have any questions/need any clarification let me know! 

    0
    コメントアクション パーマリンク
  • rbelew

    As shown in the attached screen shot, my account is listed as a Viewer for the folder i'm trying to access.

    boxAuthViewer.png

     

     

     

    > The d_value you're seeing in the error message should match the folder Id you're passing in your call.

     

    it does, except for the `d_`

     

    > In this case, it looks like you made this call using the token of your JWT service account (AutomationUser). 

     

    correct.

     

    > You can verify by using the get current user call.

     

    i'm using the python `boxsdk` module, and this function doesn't seem exposed in that?  i tried using the `curl` version: 

     

    curl https://api.box.com/2.0/users/me -H "blablabla"

     

    from the command line with the access token returned from my `JWTAuth()` call, but it returns nothing.

     

    Here is a second example of the response I'm receiving, including its `BOX-REQUEST-ID` which should let you find the details in the backend?

     

     

    boxsdk.exception.BoxAPIException: 
    Message: Not Found
    Status: 404
    Code: not_found
    Request id: 3ibjn9fw9ek5oo9v
    Headers: {'Date': 'Mon, 15 Oct 2018 17:05:06 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'BOX-REQUEST-ID': '0954vrnnoqf7d7f0o8ckubtquoq', 'Age': '0'}
    URL: https://api.box.com/2.0/folders/***number removed for privacy***2
    Method: GET
    Context info: {'errors': [{'reason': 'invalid_parameter', 'name': 'item', 'message': "Invalid value 'd_8881131962'. 'item' with value 'd_8881131962' not found"}]}

     

    0
    コメントアクション パーマリンク
  • Kourtney

    There seems to be some confusion here between the collaboration and the token making the API call.

     

    You're making the API call using a token associated with the service account of your JWT app - the AutomationUser. 

     

    However, as shown in your screenshot, you haven't added the AutomationUser as a collaborator, but rather your Box account (Richard Belew). Instead, you need to add the automation user email address as a collaborator. 

     

    Best, 

    Kourtney 

    0
    コメントアクション パーマリンク
  • rbelew

    I (think of myself as:) the same person, as AutomationUser, and as BoxUser `***email address removed for privacy***`.  

     


     wrote:
    ...
    Instead, you need to add the automation user email address as a collaborator.

    The data provider (OPD) has made "me" (***email address removed for privacy***) a collaborator.  What should I have them add instead/in addition?

    0
    コメントアクション パーマリンク
  • rbelew

    , poke?  i think i've got the data provider (Oakland Police Dept) to make me the sort of collaborator you requested, I've provided all info re: my issues making the connection work.  And now I'm getting email asking "Did you get the answer you needed?"  NO!  Please advise.

     

     

    0
    コメントアクション パーマリンク
  • Kourtney

     

    Sorry for the delay! To be clear, the service account of your application (the AutomationUser) and your Box account are two completely separate accounts. A service account has an email address that we generate, which is going to look something like AutomationUser_249497_IMnqaksArZ@boxdevedition.comTherefore, a token for your Box account is only going to be able to access content your email address has been added as a collaborator on and a token for your service account is only going to be able to access content the automation user email address has been added as a collaborator on. The automation user email address is what you need your data provider to add as a collaborator on the folder instead of your email address. 

     

    To obtain the automation email address, you will want to obtain a token for the service account and then make a call to the get current user endpoint. I would recommend making this easy by using postman

     

    0
    コメントアクション パーマリンク
  • rbelew

    hi again my turn to be slow (traveling).

    so i now appreciate that my AutomationUser’s email is not the same as my Box account user’s email.

    and since the python boxsdk doesn’t support it, i hear you recommending Postman as a (new, to me) mechanism to get my automation user email address?  so i’m trying to do that:
    - i first do a GET Request Authorization, with my client_id (screen shot attached)
    - i then use the GET Current User’s Info (https://api.box.com/2.0/users/me)
    but i get the same null/empty response to it as I got via the command line `curl` request before? (screen shot attached)
    same thing if i try GET Email aliases (https://api.box.com/2.0/users/12927765/email_aliases)

    please advise?boxPostmanGetUser.png

    boxPostmanAuth-annote.png

    0
    コメントアクション パーマリンク
  • Kourtney

     

    Let's focus on the get current user endpoint example for now. 

     

    Here's an example of all you need to input: 

    Screen Shot 2018-10-24 at 1.28.26 PM.png

     

    I usually use my developer token here while I'm just testing things out to make it easy. 

     

    If you fill it in just like my example and still receive an error could you please provide me with your client ID, a date/time/timezone and the full body response? 

    0
    コメントアクション パーマリンク
  • rbelew

    now we got rhythm!

     

    i'm attaching a screen shot of my trying what you describe.  i used my developer's token.

     

    don't think  i should provide my clientID as clear text in this forum, tho?  do you have an email i could use?

     

    my local timestamp: Wed Oct 24 12:04:36 PDT 2018

     

    as shown in the screen shot, body is empty.

    boxPostmanGetUser2.png

    0
    コメントアクション パーマリンク
  • Kourtney

     Client IDs are okay to provide publically. Client secrets/tokens are what you never want to display publically. However, if you're still uncomfortable with providing it here, you'll need to open a support ticket. Good news is that I work on the support team so if you open a ticket and provide me with the ticket number I'd be happy to grab it so you're guaranteed to have me continue working on it. 

    0
    コメントアクション パーマリンク
  • rbelew

    done, case ID#1771401

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。