Forum Discussion

Apostolos A.'s avatar
Apostolos A.
New member | Level 1
10 years ago

app secret and and app key no longer working?

Hello, 

while playing with the following initialization function:

 [[DBSession alloc]

                                initWithAppKey: [Constants dropboxAppKey]

                                appSecret: [Constants dropboxAppSecret]

                                root:kDBRootAppFolder]; 

 

for once I supplied the correct appSecret with an invalid appKey to see how it will behave. It gave a 400 error but then when I restored the correct appKey, it no longer worked.

I am sure the problem is not on my side, because I reverted to older code which was working and still could not get past the authentication.

Do you have any security measures that disable the auth on wrong combinations?

Do I have to ask for new credentials ?

9 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    If you reverted back to the correct values, there wouldn't be any reason to still receive an error.

    Can you share the full error/output that you're currently getting?

    I also recommend logging out the values of Constants dropboxAppKey and Constants dropboxAppSecret to make sure they're what you expect. (Don't post your app secret though.)

  • Apostolos A.'s avatar
    Apostolos A.
    New member | Level 1
    10 years ago

    The error I get is this:

    [WARNING] DropboxSDK: error making request to /1/account/info - (400) invalid_request

     

    i double checked the values against my app page and even reverted to older versions of my code where the app was definitely working.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    Can you share the code you're using to check the values? Also, when/where are you checking them? Maybe they're getting altered somewhere along the way. If you can share the output that may be helpful.

    Also, please share the rest of the code for the actual API call you're making.

  • Apostolos A.'s avatar
    Apostolos A.
    New member | Level 1
    10 years ago

    when I say double-check I myself am comparing to the ones that are on the "My apps" page. And they are correct, there is no chance that i give the wrong credentials. I am sure because i get the same error even when replacing the constant variables with literal strings.

    the actual method i am calling is the following:

    [self.restClient loadAccountInfo]

    where restClient is an object called like this:

        self.restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];

        self.restClient.delegate = self;

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    That code looks fine, and I haven't been able to reproduce this unfortunately. That being the case, can you share a small sample project that reproduces this so we can look into it? 

    You can send it via an API ticket if you'd prefer to share it privately:

    https://www.dropbox.com/developers/contact

    Thanks in advance! 

  • Apostolos A.'s avatar
    Apostolos A.
    New member | Level 1
    10 years ago

    OK, but how do I upload the project?

    Also, if I can reproduce the error by a REST request, I guess I can send you the REST query.

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    Feel free to use a shared link to share the project.

    If you can reproduce the error with a manual request, e.g., using curl or something, that would be fine too.

  • Apostolos A.'s avatar
    Apostolos A.
    New member | Level 1
    10 years ago

    Ok done. The app secret is included in the API ticket, but there is no other way for you to test it. 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    Thanks! We'll look into it and follow up with you in your ticket.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!