Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Request (You may only upload one video per post.) #91

Open
anuj9196 opened this issue Nov 30, 2017 · 1 comment
Open

Bad Request (You may only upload one video per post.) #91

anuj9196 opened this issue Nov 30, 2017 · 1 comment

Comments

@anuj9196
Copy link

I'm using tumbler API in my Application to post videos on behalf of user's account by authentication

       $tumblr = new Client(
            $this->app_key,
            $this->app_secret,
            $this->access_token,
            $this->token_secret
        );

        try {


            $blog_name = $tumblr->getUserInfo()->user->name;
            $caption = $title;
            $data = [
                'type' => 'video',
                'caption' => $caption,
                'data' => $video_file,
            ];

            $result = $tumblr->getUserInfo();

            //debug($result);

            $result = $tumblr->createPost($blog_name, $data);

            if ($result) {
                $response['status'] = true;
                $response['video_id'] = $result->id;
                $response['blog_name'] = $blog_name;
            } else {
                $response['status'] = false;
                $response['message'] = $result;
            }
        } catch (RequestException $e) {
            $response['status'] = false;
            $response['message'] = 'Video uploading failed: ' . $e->getMessage();
        }

After posting one video, it starts giving error

Video uploading failed: Bad Request (You may only upload one video per post.)

Is this account specific issue or API related issue? Also, how to resolve it?

@ravimisra
Copy link

ravimisra commented Feb 14, 2018

I had fixed the issue in this pull request, please pull these changes into your code.

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

No branches or pull requests

2 participants