question

paul-tracy2971 avatar image
paul-tracy2971 asked Anirban edited

Invalid Account error using API request (error code = PIC-018)

I just got my app promoted to production and was testing api calls. For the below request I am getting back the error "Invalid Account". I am taking "owner_id" from the oauth\token results (Just like i did in the sandbox environment which worked) and supplying that as the accountID. Why does this work in the sandbox and not prodution


API Request:

https://platform.ringcentral.com/restapi/v1.0/account/<accountId goes here>/message-store-report


Result:

{

"errors": [

{

"errorCode": "PIC-018",

"message": "Invalid account"

}

]

}

rest api
1 |3000

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

paul-tracy2971 avatar image
paul-tracy2971 answered

Never mind.... I used the ~ in place of the accountid and it is working...

1 |3000

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

Anirban avatar image
Anirban answered Anirban edited

You can use the following to get Account ID:

https://platform.ringcentral.com/restapi/v1.0/account/~

Or

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~

You will get a response where there will be the full uri you requested which includes account id and extension id

example:

https://platform.ringcentral.com/restapi/v1.0/account/123456780/extension/123456

Remember to use production url

1 |3000

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