question

Sagar Arora avatar image
Sagar Arora asked Sharina Caro commented

Can't set password for production app

I am not able to set production app password as it says N/A.

rest api
3 comments
1 |3000

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

mary-community-moderator avatar image mary-community-moderator ♦♦ commented ·

Hi Sagar, can you tell us more about your issue? What do you mean by production app?

0 Likes 0 ·
Sagar Arora avatar image Sagar Arora mary-community-moderator ♦♦ commented ·

Sure so i upgraded my app from sandbox environment to production environment. And when i try to hit the api using production app credentials it fails and error is wrong credentials and when i try to reset the password it show N/A. So i am not sure why that is.

0 Likes 0 ·
mary-community-moderator avatar image mary-community-moderator ♦♦ Sagar Arora commented ·

Thanks for clarifying. I will move your post to our API Support Team.

0 Likes 0 ·
Phong Vu avatar image
Phong Vu answered Sagar Arora commented

Apologies for moving you back and forth between the Developer and Customer community.

Because you wrote "password for production app". Well, app does not have a password so I thought that you meant resetting a user password on production.

Anyway, after moving your app to production, first, you have to change the app production credentials (client id and secret) in your code. Then you have to login with user credentials (username and password) of a user under your production account.

10 comments
1 |3000

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

Sagar Arora avatar image Sagar Arora commented ·

tried it but that doesn't seem to work. Error still saying "ringcentral.http.api_exception.ApiException: Invalid resource owner credentials"

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Sagar Arora commented ·

You have to trust that error messages. If you search for "Invalid resource owner credentials" term in this forum, you will see that many other developers made mistake with their login credentials. You can quickly verify if the username and password is correct by login https://service.ringcentral.com. If you can login the service web site, you must be able to login your app with the exact username, password and EXTENSION number (if you use the main company number as the username)

0 Likes 0 ·
Sagar Arora avatar image Sagar Arora Phong Vu ♦♦ commented ·

Yeah i tried everything and i have verified the credential but somehow it is not working.


0 Likes 0 ·
Show more comments
Sagar Arora avatar image
Sagar Arora answered

@Phong Vu Can you please also help me with a sample code which is processing the api response for call-logs for python


1 |3000

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

This is an example to read the call log from the beginning of May 21, and write the record to a .CSV file.

fileName = "callrecords.csv"
file = open(fileName,'w')
header = 'id,sessionId,startTime,duration,type,direction,action,result,to_name,from_name,transport'
file.write(header)
file.close()

def read_call_log():
    params = {
        'dateFrom': '2021-05-01T00:00:00.000Z',
        'perPage': 1000,
        'view': 'Detailed'
        }

    resp = platform.get('/restapi/v1.0/account/~/call-log', params)
    write_call_records(resp)

def write_call_records(response
    file = open(fileName,'a')
    jsonObj = response.json()
    for record in jsonObj.records:
        line = "\r\n"
        line += record.id + ','
        line += record.sessionId + ','
        line += record.startTime + ','
        line += str(record.duration) + ','
        line += record.type + ','
        line += record.direction + ','
        line += record.action + ','
        line += record.result + ','

        if record.to != None:
            if "name" in record.to:
                line += record.to.name + ','
            else:
                line += 'null,'
        else:
            line += 'null,'

        if record.from != None:
            if record.from.name != None:
                line += record.from.name + ','
            else:
                line += 'null,'
        else:
            line += 'null,'

        line += record.transport

        # add to your CRM  or other db
        # for demo, I write to a file
        file.write(line)
    file.close()

read_call_log()
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