Pregunta

I'm new to OAuth and I need help in accessing the Survey Monkey API to get the auth token. I tried using login_with_surveymonkey.php code and changed the client_id, client_secret, and api_key (https://developer.surveymonkey.com/apps/mykeys). It is giving me this error message:

'it was not possible to open the OAuth access token URL: could not resolve the host domain "api.surveymonkey.net"'

I tried running it on our dev environment and the error returned changed: 'it was not possible to access the OAuth access token: it was returned an unexpected response status 401 Response: {"error_description": "Invalid client_id/client_secret/api_key", "error": "invalid_client"}'

However, when I used the io-docs (https://developer.surveymonkey.com/io-docs) using the same client_id, client_secret, and api_key, I was able to connect to retrieve a token. I have curl working on my local machine.

Am I missing something?

Thanks!

¿Fue útil?

Solución

The IO Docs API console does not actually perform OAuth correctly and is unfortunately not a good model on how to do OAuth - we have a replacement coming very soon.

The source code for that PHP OAuth implementation looks good, so I would check the following things:

Edit: According to our logs, it looks like you've solved this problem, correct? I think you were providing the api_key as the client_secret.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top