We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

kkanchev94's avatar
kkanchev94
New member | Level 2
7 months ago

Dropbox API - Invalid redirect URI (Error 400) with React Native Expo

I am building a React native app and trying to integrate the Dropbox API.

I'm following expo's app auth guide: https://docs.expo.dev/guides/authentication/#dropbox

and I have the App registered with a scheme in the redirect URI's as: com.kkanchev94.esignapp://oauth

and the same one registered and build with that scheme in the mobile app, but I keep receiving the same error over and over.

Tried with with a different schemes - which I registered on the Dropbox API side as well, but without any luck.

Has anyone faced the same challenges with the invalid redirect URI for building on a mobile app and

how should I go about resolving it. Much appreciated!!

  • kkanchev94's avatar
    kkanchev94
    New member | Level 2

    I was able to figure it out, what you need to do is divide your scheme into two parts like such:

    Scheme registered and built in the mobile app - com.kkanchev94.esignapp://oauth

    Use the code from https://docs.expo.dev/guides/authentication/#dropbox

    - on scheme divide your redirect URI as the following template:

     redirectUri: makeRedirectUri({
            scheme: "com.kkanchev94.esignapp",
            path: "oauth",
          }),
     
    Omit the "://", it will be added automatically
    Hope that helps, this is for an Expo built project.