Question

resource for parameter accountid is not found when tryinfg to send fax

  • 27 October 2020
  • 2 replies
  • 777 views

Trying to send fax using the example code: this is throwing:

Resource for parameter [accountId] is not found

The code I am using


from ringcentral import SDK

rcsdk = SDK("xxxxx...", "xxxxx...", "https://platform.devtest.ringcentral.com")
platform = rcsdk.platform()
platform.login("+15551212", "101", "password")
accountId= "+phonenumber"
extensionId= "101"
recipient="+1999..."
builder = rcsdk.create_multipart_builder()
builder.set_body({
'to' :[{'phonenumber': recipient}],
'faxresolution': "High'",
'coverPageText': "This is a fax page sent to you automatically"
})
request = builder.request(f'/restapi/v1.0/account/{accountId}/extension/{extensionId}/fax')
resp = platform.send_request(request) #Exception here


My question is what is tbe accountId, I ave been using the phonenumber listed in my account. There seems to be no other reference to accountid anywhere?


2 replies

You can use https://platform.devtest.ringcentral.com/restapi/v1.0/account/~ to get your account id number in response as Id


Thanks, I seem to be getting the accountid, however, when I try to run the above code, I get
resource not found

at this point:
platform.login("+15551212", "101", "password")

What Am I missing?

Reply