Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2020-12-20 17:36:20

mohan
New User
Registered: 2020-12-18
Posts: 1

Need to call gRPC method in rest api call

Hi,

Need to call Users.DoesUserExist Users.CreateUser via php rest call.
How we can achieve that.
Please help.

Regards,
Mohan

Offline

#2 2021-02-04 13:06:11

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: Need to call gRPC method in rest api call

Hi Mohan,

Firstly, just to clarify for any future reader: these are methods in the internal JSON API, not in the REST API.

There is a PHP JSON API client available here: https://www.thirdlight.com/docs/display … PHP+Client

With that, you could then call:

$objAPI->Users_DoesUserExist(["username"=>$usernameToFind]);

and:

$objAPI->Users_CreateUser(["username"=>$usernameToCreate,"details"=> [
  "name"=> $strName,
  "description" => "Description or job title",
  "email" => "user@domain.com"
], "welcomeEmail"=>true]);

There are additional options you can specify when creating a user - I would refer you to /docs/api/legacy.html on your Chorus site for further information.

Kind regards,

Dominic

Offline

Board footer