Skip to content

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

Open
@anuj9196

Description

@anuj9196

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions