Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

403 - Request forbidden by administrative rules #67

Open
sfatfarma opened this issue Aug 19, 2017 · 3 comments
Open

403 - Request forbidden by administrative rules #67

sfatfarma opened this issue Aug 19, 2017 · 3 comments

Comments

@sfatfarma
Copy link

Hello,

I was using this sdk and until now it was working. Congrats for your work!

But recently, I noticed that it cannot post any more to Reddit and I get this error instead:

403 - Request forbidden by administrative rules

Can you help me please with this? Thank you very much.

Regards,
Szabi.

@kishan-v
Copy link

kishan-v commented Sep 15, 2017

@sfatfarma I recently made a call to the api for the first time (i think) but I get the 403 error, have you been able to fix it? @jcleblanc any ideas, has something gone wrong?

Thanks
KishanV

@sfatfarma
Copy link
Author

Hello @reaper03
No fix yet.

My code:

try
            {
                require_once(dirname(__FILE__) . "/res/reddit-sdk/reddit.php");
                $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
                $reddit = new reddit($app_id, $app_secret, $actual_link, false);
                if($reddit == false)
                {
                    //fail
                    return;
                }
            }
            catch(Exception $e)
            {
                //fail again
return;
            }
try {
                    $response = $reddit->createStory($post_template, $post_link, $subreddit);
                    if($response === null || $response === false)
                    {
//fail
return;
}
}
catch (Exception $e) {
                    //fail once again
return;
                }

@kishan-v
Copy link

Oh shame thanks for the reply though, if u want I can direct you to another PHP wrapper that should work if not check out Praw (python)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants