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

Create password change ticket fails #84

Closed
brightbeagle opened this issue May 23, 2016 · 5 comments
Closed

Create password change ticket fails #84

brightbeagle opened this issue May 23, 2016 · 5 comments

Comments

@brightbeagle
Copy link

src/API/Management/Tickets.php

Method createPasswordChangeTicket, the apiClient post header is missing 'application/json', resulting in a invalid body error.

Also, the method should have a default value of null for $new_password, and should only get added to $body if not null, as the new password field is optional in the API.

@glena
Copy link
Contributor

glena commented May 24, 2016

You are right, it should be fixed by 3.3.4.

let me know how it goes after the upgrade. Thx for reporting

@glena glena closed this as completed May 24, 2016
@brightbeagle
Copy link
Author

Haven't tried it yet, but I think you are still going to need to add 'application/json' to the apiClient post:

return $this->apiClient->post()
            ->tickets()
            ->addPath('password-change')
            ->withHeader(new ContentType('application/json'))
            ->withBody(json_encode($body))
            ->call();

@glena
Copy link
Contributor

glena commented May 24, 2016

Shoot, you are right, try 3.3.5. Sorry about that

@brightbeagle
Copy link
Author

Worked on 3.3.5. Thanks.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
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