1

Beginner programmer here. I am trying for third party app development from Smartsheet api in React Native. Just following OAuth flow which is mentioned here http://smartsheet-platform.github.io/api-docs/?javascript#third-party-app-development Here is the request which i need to send "GET https://app.smartsheet.com/b/authorize"

And params with it are following: response_type: 'code', client_id: '1samp48lel5for68you', redirect_uri: 'http://localhost:3000/callback' (But i don't know what will be for my React Native app.), scope: 'CREATE_SHEETS WRITE_SHEETS',

So my question is what will be redirect_uri for my app ? If i use any dummy web callback uri it gives me error of invalid uri. I want to request for an Authorization Code from that api.

Please help me out i have already spent so many hours to solve this issue but in vain. Thanks in advance.

Nicola Ambrosetti
  • 2,567
  • 3
  • 22
  • 38
  • 1
    Callback url for mobile apps generally is a custom url scheme that your app register with the phone os (ios/android). Ex: your callback url could be something like `myapp://callback` where `myapp://` is your app's url scheme. So to get this working you need to check how to register app url schemes in iOS and Android. – Amar Jul 12 '19 at 08:07

1 Answers1

0

Setting up an application for the Smartsheet OAuth flow requires providing an HTTPS URL for the APP redirect URL when registering the app. For this you can setup an OAuth server (using Node.js & Express possibly) to do all of the authentication work. Then your mobile app talks to that server to trigger the authentication process. This server could also be used to do all of the interaction with the Smartsheet API itself. Then your mobile app talks to this server to get the data it needs from Smartsheet.

daveskull81
  • 627
  • 4
  • 7