News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Invalid Account error using API request (error code = PIC-018)
Tags: rest api
Jul 16, 2020 at 12:50pm   •   2 replies  •  0 likes
paul-tracy

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"

}

]

}

2 Answers
answered on Jul 16, 2020 at 1:20pm  

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


 0
answered on Jul 16, 2020 at 1:12pm  

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


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us