Beatport OAuth from .NET, anyone?

199 views
Skip to first unread message

Leszek

unread,
Jan 2, 2015, 11:52:07 AM1/2/15
to beatpo...@googlegroups.com
Hello, has anyone out there been successful with using the Beatport API from .NET, either VB.NET or C#?

I have been trying for some time, and I cannot get the OAuth step to work at all.
I cannot even get past the first step of requesting the first token, whatever I try I always get "401 Unauthorized".
I also tried generating the keys manually from the Beatport page, and proceeding to the next step in code to access a resource, but I get the same error.

I am using the simple Oauth.Vb.Net lib, and following various other basic OAuth examples, alhough I cannot find any examples for Beatport specifically.

There seems to be no documentation or help from Beatport, other than pointing you to the official OAuth spec.
(I think THIS http://oauth.net/core/1.0/#anchor14, would be a more useful link, instead of the one they actually use.)

After hours of Googling, the only examples I can find are for web pages and mostly .php, whereas in my case it is a desktop app using VB.NET.

Does anyone have a working example of the OAuth process with Beatport, in VB or C#?
Failing that, any pointers?

Thanks.

Snafuflux

unread,
Apr 11, 2015, 7:53:43 PM4/11/15
to beatpo...@googlegroups.com
Hey Leszek, I too am trying to accomplish what you're trying with no success.  All I ever get is 401 Unauthorized.  Did you happen to get it to work?

I've been trying by building my own request and posting.  I haven't been using a lib... yet.

Leszek

unread,
Apr 27, 2015, 9:10:00 AM4/27/15
to beatpo...@googlegroups.com
Hi, yes I did get it to work. After a lot of internet searching, I found a number of comments suggesting that the code in the oath library I was using, may be faulty.
So I abandoned that library, and tried another one, and as soon as I switched to the other library, that error went away, and the authorization step immediately started working.

The new library I am using for the oauth part is this one:

Try that, but if you need any more specific info, just let me know.

Leszek

Daniel Torelli

unread,
Jun 17, 2015, 2:05:32 PM6/17/15
to beatpo...@googlegroups.com
Hi Leszek,

I tried the library you mentioned and it pops up a beatport login. Is there a way to authenticate through code instead?

Thanks!

Leszek

unread,
Jun 19, 2015, 3:14:15 AM6/19/15
to beatpo...@googlegroups.com
It does pop up with the Beatport login form, yes.  In my case I was just doing some initial testing, so I have lived with the form for now, but it is annoying, and I'd like to do it all in code also.
I haven't had time to look into it further, but I assume there must be a way.
One thing I have never been clear on, is whether you need special permission from Beatport to do a direct access without the user login screen, perhaps someone on here knows?

The Beatport API page says the following about "Direct Access":
"This performs a direct authentication, thereby bypassing the Authorize page and submitting a verify parameter. Instead, this requires a username and password as used with beatport.com. This is useful for obtaining the direct access token immediately in non-web applications. Using this authentication method requires special permissions for your API key."


Leszek
Reply all
Reply to author
Forward
0 new messages