harveysburger / pinnaclewrapper

A C# Wrapper for the PinnacleSports API
25 stars 56 forks source link

System.Net.Http.HttpRequestException #15

Closed captholley closed 4 years ago

captholley commented 4 years ago

I have created a console app to test the connection with the API and just to mess around but cannot get past this error:

System.Net.Http.HttpRequestException: 'Response status code does not indicate success: 301 (Moved Permanently).'

This error occurs after I create the HttpClientFactory and the PinnacleClient, then I call await GetFixtures and the program gets hung up and this error trips. What am I doing wrong here? I thought it might be an issue with the URL or my username/password but I cannot figure this out. Any help would be appreciated!

captholley commented 4 years ago

Seems to access the API you need a funded account. Let me try that and I will update if it solves the issue.

EDIT: My account is now funded but I am still having this issue. Any ideas?

harveysburger commented 4 years ago

Potentially some delay between funding and Api enabling, not sure, wait overnight and check again

Other option is, eSports no longer avail on the api so forget that one

Also some countries are IP blocked... Though if you successfully signed up and deposit I guess yours isn't blocked...

Oh one thing, place some bets via website, strictly being funded might not be enough,, place a bet or two for something that plays today, so by tomorrow you're bet will be resulted... If lucky it will work then

harveysburger commented 4 years ago

Did things workout in the end?

captholley commented 4 years ago

I have figured out that you are correct and it is due to my IP being blocked. I am located in a country that is available, but my server where I am working on the program is not. I am working to relocate the server or at least use a VPN to change my geo-location but that is turning out to be another issue unto itself. I will let you know when I figure that out and can finally get it working. Thanks for following up!

In the meantime, if anyone has experience with connecting a VPS to a VPN (i.e. Windscribe), feel free to comment on this reddit post :P

captholley commented 4 years ago

Update: I have been waiting to get my account verified in order to use the API. There was a bug in their system so I contacted customer support. This was not immediately resolved so I asked if there was a workaround in order to use the API services immediately. This is the response I received:

To ensure we provide a better user experience to professional customers, we have made the decision of commercialising the betting API product. As such the betting API is now limited to exclusive customers and partners with a monthly fee of USD5,000, or a monthly minimum volume of USD250k.

Has anyone else ran into this new policy? Seems extremely high and unfortunate I will not meet this threshold.

harveysburger commented 4 years ago

I wasn't sure of the specifics. Pretty steep indeed! If you dont mind I'll close this issue here since it's unfortunately outside the scope of a wrapper :)

Good luck