Have token expire in a short time span for debugging purposes

596 views
Skip to first unread message

ericbrotto

unread,
Jul 7, 2011, 5:50:10 AM7/7/11
to SoundCloudAPI
Hello,

I have been spending a lot of time trying to debug my 401 error as
described here:

https://groups.google.com/group/soundcloudapi/browse_thread/thread/08e82d38c2a4b6c5#

and here:

http://stackoverflow.com/questions/6533266/401-error-code-when-using-soundcloud-api-oauth2

I've noticed that when I sign into my iPhone application the token
lasts for an hour. This means that when I kill my app then reconfigure
my client ID and key and then relaunch the app again my user name and
info are automatically logged in using the token.

Since the one client ID and key work and the other one doesn't I would
like to able to switch between the two rapidly so as to compare what
they are doing differently and to get to the bottom of my problem. Is
there anyway to configure the application so the token only lasts a
minute? This would greatly speed up my debugging process.

Of course, if anyone has any idea as to what might be causing my
problem in the first place, that would also be helpful.

Thanks,

Eric

Ullrich Schäfer

unread,
Jul 7, 2011, 8:53:40 AM7/7/11
to soundc...@googlegroups.com
Hi,

You should not reconfigure your app with different tokens.
Use the one that has been generated on soundcloud.com/you/apps

Also you should concider using a different type of redirect url.
On StackOverflow you wrote that you have an URL identifier "com.imc" in your info.plist. What matters is the URL scheme.
Set it to something like "my-iphone-app" and then set your redirect URL to something like "my-iphone-app://oauth"

Please try to use charles (http://www.charlesproxy.com/) to see if the requests really go to soundcloud.com and not sandbox-soundcloud.com.

If that ain't working it might help if you could send me a protocol of your charles session. But let's figure this out later.

Best,
Ullrich

PS: make sure to enable SSL proxying for *soundcloud.com under Proxy->Proxy Settings->SSL
PPS: Also make sure to have the charles CA cert installed: http://www.charlesproxy.com/assets/release/3.4/ssl.zip

-- 
Ullrich Schäfer
iOS Team, SoundCloud
Co-Founder & Engineer, nxtbgthng

Rosenthaler Straße 13, 10119 Berlin, Germany

--
You received this message because you are subscribed to the Google Groups "SoundCloudAPI" group.
To post to this group, send email to soundc...@googlegroups.com.
To unsubscribe from this group, send email to soundcloudap...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/soundcloudapi?hl=en.


Reply all
Reply to author
Forward
0 new messages