Welcome to the new Box Support website. Check out all the details here on what’s changed.

can't able to open folder using access token

New post

Comments

3 comments

  • Peter Christensen

    HI Akanksha

    Most likely you are getting a token for a user that does not have access to the folder in question. An access token always belongs to a user and if you have used the API you probably have a server side app like a JWT or Client Credentials Grant app. When you generate a token for these you will get a token for the service account or automation user generated with the app. You can check this by running this API and check the details of the user returned. https://developer.box.com/reference/get-users-me/

    If the folder is owned by your 'standard' box user you can either generate a token for that user, use the 'as-user' header or collaborate the automation user onto the folder. You can see the loginID of the automation user in the general settings of your app in the developer console.. It will look like 'AutomationUser_123456_abcdef@boxdevedition.com 

    Hope this helps

    Peter Christensen, Platform Solutions Engineer, Box

    0
    Comment actions Permalink
  • akanksha singh

    Hi Peter ,
    can you let me know how can we generate access token using client credentials grant app ? 
    i tried using this approach. but how can we get auth code to pass in the header?

     

    0
    Comment actions Permalink
  • Peter Christensen

    Hi

    With client credentials grant you don't need the auth code as it is a server side authentication.

    See this guide: https://developer.box.com/guides/authentication/client-credentials/ which has some examples

    Rgds,

    Peter

    0
    Comment actions Permalink

Post is closed for comments.