Jump to content

RSS Feed - Forbidden (403)


Go to solution Solved by Marc,

Recommended Posts

Posted

Hi,

When I access to the RSS through the website, I see there is a parameter "key" with a guid. That guid is updated each some days.

I'm trying to do a webrequest from my code to get the RSS XML without passing that "key" parameter. I'm getting a Forbidden (403) error. I'm setting the admin credentials in the code.

This is my source code:

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://social.vcoins.com/rss/4-this-week-in-history-vcoins-community.xml");
request.UserAgent = "My User Agent";
request.Credentials = new NetworkCredential("xxxxxxxxxxx", "xxxxxxxxxxxxxx");
document.Load(request.GetResponse().GetResponseStream());

I would approciate your help!

Thanks!

Ariel

 

Posted

We are unable to assist with custom development unfortunately. I would ask however, why it is you need to pass credentials at all? That feed appears to be public anyway. Also, why would you not use the key?

Posted

I add that the "Groups that can see this feed" field is set only for Administrators.

I understand that setting the admin credentials, it should work!

However, I continue getting the 403 error.

Posted

You would use the key, not try to set networkcredentials as you are trying to do there. You may actually be best to use the REST API to get your data however, if its just the topics you are trying to get

Posted

Thanks Marc for your answer.

I just changed the feed to public. I don't want it public.

The key is not the same always. I see it was updated this week automatically.

I don't know if I'm doing something in the incorrect way.

Ariel

How can I get the key via API? Is it correct that it is updated every week?

Posted

If you access using a key of a person logged in, that key would remain. You would pass the member_id and key field

 

With regard the REST API, Im not referring to getting the key. Im referring to getting the data. 

Posted

I'm thinking that maybe the key was changed because the admin password was changed. Is it make sense?

Also, where can I get the admin key in the ACP? I'm in the admin member page.

Ariel

Posted

RSS does not have basic auth, so you cant use what you are trying to use there.  You cannot access the key via the admin CP, you would key it from selecting the feed.

If credentials change, then yes the key would change. So if you changed your password it would indeed change.

What exactly is it you are trying to do here? You can get to most information from the REST API, and would then use a key for this purpose

Posted

I know I could get the key from the URL when I open the RSS. However, I want to be sure that key doesn't change.

Could you confirm me that the key does NOT changes except the member password is changed?

Excellent Marc. Thank you!

Posted

The key changes if anything related to authentication changes. So password, displayname, emails. 

Again however, if you let us know what it is you are trying to achieve, we may be able to point you in a better direction. Getting data this way would be unusual

Posted

What I was trying to do is to get the feed XML (https://social.vcoins.com/rss/4-this-week-in-history-vcoins-community.xml/?member_id=1&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) through my source code. I was passing the incorrect key because I changed the member password some days ago.

Now, I know that if I don't change anything from the admin member, the key should not be changed and I should not have problems to get the feed XML

Ariel

Posted

I think you may have misunderstood the question there. I mean what is it you need it in RSS format for? As mentioned. You would not usually get the data in this way

Posted

I need the last 3 articles of each section to show them in another website.

I run a process weekly that get some data from the feed and save it in a database. Then, the other website gets the data from the database to show it.

Posted
6 minutes ago, Ariel S said:

Excellent. I will make the change when I have some time! In the meantime, with the current way, could I get the data?

If you use the key and member_id you could

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...