SyntaxFix
Write A Post
Hire A Developer
Questions
Adding ->getContents() doesn't return jSON response, instead it returns as text.
->getContents()
You can simply use json_decode
json_decode