Forum Discussion

vas1992's avatar
vas1992
Helpful | Level 5
3 years ago
Solved

ACCESS_CODE_GENERATED

Hello. I have 2 Dropbox accounts. Working and testing. I have created a script to upload files to the cloud. While trying to get a passcode, I came across an error message: "Log in to your work account first." I tried with two accounts. From test and main. Unsuccessfully! Can you explain to me what's wrong? Or advise how can I get a long-lived access token?

 

https://www.dropbox.com/oauth2/authorize?client_id=<APP_KEY>&token_access_type=offline&response_type=code

 

  • vas92 As Здравко mentioned, it sounds like you have one or more "team" scopes enabled on the app you're attempting to connect. The "team" scopes enable access to Dropbox team-specific functionality, and so can only be authorized by Dropbox team admins. If your account is not on a Dropbox team, you won't be able to authorize an app with team scopes and will instead receive such an error.

     

    You can modify the scopes enabled for your app on the app's page on the App Console.

  • vas92's avatar
    vas92
    Explorer | Level 3

    I follow the link, substituting my key, an account login form appears. I enter my username and password. I enter. The message "Sign in to your work account!" appears. What is this problem? This was not the case a week ago! I have 2 dropbox accounts, if that matters...

     

    https://www.dropbox.com/oauth2/authorize?token_access_type=offline&response_type=code&client_id=<App key>

     

  • vas1992's avatar
    vas1992
    Helpful | Level 5

    Can't add account to workgroup

     

    After filling out the registration form for the joining account, a message appears: "First, log into the workgroup account"!

     

    • Hannah's avatar
      Hannah
      Icon for Dropbox Staff rankDropbox Staff

      Hey vas1992, thanks for reaching out to us today.

       

      I understand you're trying to pair a Dropbox Business account with an individual one.

       

      Can you open a different browser or a private browsing window, sign in to either the Business account or the personal one and follow the steps here, to see if they help?

       

      Keep me posted.

  • vas92's avatar
    vas92
    Explorer | Level 3

    I follow the link, substituting my key, an account login form appears. I enter my username and password. I enter. The message "Sign in to your work account!" appears. What is this problem? This was not the case a week ago! I have 2 dropbox accounts, if that matters...

     

    https://www.dropbox.com/oauth2/authorize?token_access_type=offline&response_type=code&client_id=<App key>
    • Greg-DB's avatar
      Greg-DB
      Icon for Dropbox Staff rankDropbox Staff

      vas92 As Здравко mentioned, it sounds like you have one or more "team" scopes enabled on the app you're attempting to connect. The "team" scopes enable access to Dropbox team-specific functionality, and so can only be authorized by Dropbox team admins. If your account is not on a Dropbox team, you won't be able to authorize an app with team scopes and will instead receive such an error.

       

      You can modify the scopes enabled for your app on the app's page on the App Console.

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    vas92 wrote:

    ... The message "Sign in to your work account!" appears. What is this problem? ...


    Hi vas92,

    Seems you are trying to link team scoped application to non team account (personal account). 😜 That's the your problem.

     


    vas92 wrote:

    ... This was not the case a week ago! ...


    Have you changed something in your application' scopes in meantime (added some team scopes by any chance, including unintentionally)? 🧐 If you want to use team scopes, you need to use team account (including for test), unfortunately. There are some feature requests about possibility to test team application on individual account, but no any move by Dropbox yet. 🤷

    Hope this clarifies matter.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers804 PostsLatest Activity: 12 hours ago
217 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!