-3

I followed the directions on this page to set up my Mashery Survey Monkey account. I set my API key and secret options using their values on the app. I used my client ID, which I assume is my "display name" to set sm_client_id. I then used smlogin(), and was directed to a page with the following error:

SurveyMonkey

The authorization request failed: Invalid client_id and/or redirect_uri

What else could I be doing wrong?

BTW, I tried this setting the app both as Public and Private. Same problem each time.

Brash Equilibrium
  • 1,357
  • 4
  • 14
  • 35
  • 2
    Did you create your app from https://developer.surveymonkey.com ? If so go to your app settings and use the Client ID/API Key from the settings page (the credentials section) and the redirect URI from the top of the page and that should work. You need to make sure your redirect URI is a page you host that will accept the code and exchange it for an access token. If you're just using this for yourself, if the SDK allows it you can just use the access token provided from the credentials section. – General Kandalaft Aug 17 '16 at 17:31
  • Oh, I see. The client ID is not the same as the display name. I am a moron. – Brash Equilibrium Aug 17 '16 at 20:27
  • General, make this an answer and get the checkmark you so rightly deserve. – Brash Equilibrium Aug 17 '16 at 20:30
  • Those voting to close this topic should think again. I think as the Rmonkey package becomes more widely used by R users (many of whom even more unfamiliar with API standards than me), you'll get more questions like this. Keep the question open to avoid duplicates. The negative votes also won't help avoid duplicates. But, whatever, SO has spoken. – Brash Equilibrium Aug 17 '16 at 20:40

1 Answers1

2

You should first create your app at https://developer.surveymonkey.com/apps

After creating your app, go to the settings section. From there you should use the Client ID/API Key from that page (located in the credentials section at the bottom) and the redirect URI from the top of the page (that you set yourself) and that should work.

You need to make sure your redirect URI is a page you host that will accept the code and exchange it for an access token. If you're just using this for yourself, and the SDK allows it, you can just use the access token provided from the credentials section.

General Kandalaft
  • 2,215
  • 2
  • 18
  • 25
  • 1
    BTW, for others viewing this answer, you can find your client ID (in the current version) down at THE BOTTOM of the SurveyMonkey Settings page. It IS NOT the display name. – Brash Equilibrium Aug 17 '16 at 20:38