question

jesse-wolfe8740 avatar image
jesse-wolfe8740 asked Phong Vu answered

Undefined Property $this->_appKey


Hi all,

I am trying to integrate RingcCentral into my Laravel 5.5 site for a business with a RingCentral account.


I had to download the SDK manually, but I have the page displaying without error if I set the line

"'client_id' => $this->_appKey,"

equal to a constant inside the authUrl function.


public function authUrl($options){    return $this->createUrl(self::AUTHORIZE_ENDPOINT . '?' . http_build_query(        array (        'response_type' => 'code',        'redirect_uri'  => $options['redirectUri'] ? $options['redirectUri'] : null,        'client_id'     => $this->_appKey,        'state'         => $options['state'] ? $options['state'] : null,        'brand_id'      => $options['brandId'] ? $options['brandId'] : null,        'display'       => $options['display'] ? $options['display'] : null,        'prompt'        => $options['prompt'] ? $options['prompt'] : null    )), array(        'addServer'     => 'true'    ));}

But if I do not set the client_id property to some constant I get an error saying that '$this->_appKey" is an undefined property.


If I do set that value to a constant of my correct client_id I get this error:

{  "error" : "invalid_client",  "error_description" : "Invalid client: ",  "errors" : [ {    "errorCode" : "OAU-153",    "message" : "Invalid client: ",    "parameters" : [ {      "parameterName" : "client_id",      "parameterValue" : ""    } ]  } ]}

I would greatly appreciate any help with this, as every attempt to do anything has been met with a multitude of errors.

sdk
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

John Wang avatar image
John Wang answered
I've added this information to your post on our SDK GitHub issue page here:

https://github.com/ringcentral/ringcentral-php/issues/62

Let's keep this discussion there since this is a SDK topic.
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered
Hi Jesse,

Can you quickly open the SDK Platform.php file and change line you highlighted above then test again.
Current:
'client_id' => $this->_appKey,
Change to:
'client_id' => $this->_clientId,

Let me know if that helps!

+ Phong
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered
I have updated the SDK with the right _appKey new terminology as _clientId. You can download the SDK again and try it.

+ Phong
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys