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
RingCentral API Calls from Ignition By Inductive Automation
Tags: api auth
Jul 12, 2021 at 4:36pm   •   1 replies  •  0 likes
Michael Edmonson

Hello,

I am using a SCADA software called ignition that has Jython embedded into it that I can use to do all kinds of scripting like api calls. I'm trying to figure out how to get call logs from ringCentral within ignition using some built in functions from ignition/python ( I tried to simply import the ringCentral python library into the backend of ignition, but one or more of the dependencies of the library is done in C and that doesnt work with Jython). To begin with i've been trying to log in using a post call but am getting an error. Here are some screenshots. I've been trying to get this to work for the better part of a week so any help is appreciated in advance!

1626132841256.png

1626132859576.png



FYI here's some info on the built in functions im using for the calls https://docs.inductiveautomation.com/display/DOC80/system.net.httpClient

1 Answer
answered on Jul 12, 2021 at 9:26pm  

Where do you set the Authorization header?

Authorization: Basic xxxxxxx

where xxxxxx is the based64 encode of "app_client_id:app_client_secret"


 0
on Jul 13, 2021 at 2:08pm   •  0 likes

Do you have any other information on how to encode the app_client_id:app_client_secret ?

I tried using this website but there are a few parameters that i dont know about.

https://www.base64encode.org/

on Jul 13, 2021 at 2:27pm   •  0 likes

Simple as this

screen-shot-2021-07-13-at-22652-pm.png

on Jul 13, 2021 at 2:40pm   •  0 likes

Okay thank you! but still getting the same error :( resource not found 1626212398994.png

on Jul 13, 2021 at 2:41pm   •  1 likes

you still missed the Basic xxxxxx

on Jul 13, 2021 at 2:43pm   •  0 likes

I forgot to add the "Basic" but the rest of the encoded key is there on line 9. i Added the word basic and still same error..

on Jul 13, 2021 at 2:48pm   •  0 likes

Why did you add the /POST in the authUrl? remove it.

on Jul 13, 2021 at 2:50pm   •  0 likes

Good catch. That didnt work either though lol :(

on Jul 13, 2021 at 2:56pm   •  1 likes

You app's platform type is incorrect:

Platform type: Server/Web

To authenticate with password flow, you need to specify the app's platform type as "Server-only (No UI)"

I just changed it for you. Try it again.

on Jul 13, 2021 at 3:25pm   •  0 likes

Still no luck unfortunately

on Jul 13, 2021 at 4:46pm   •  0 likes

Can you try

headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Accept': 'application/json',
'Authorization': 'Basic xxxxx'
}
on Jul 13, 2021 at 5:35pm   •  0 likes

no change.

on Jul 14, 2021 at 6:29am   •  0 likes

The string "%20/HTTP/1.1" should not be in the authUrl either

on Jul 14, 2021 at 7:42am   •  0 likes

hey!!! different error! that's good lol some progress.

1626273739217.png

on Jul 14, 2021 at 7:55am   •  0 likes

Can you login https://service.devtest.ringcentral.com with that user login credentials? If yes, can you remove the plus sign "+" from the username (or escape it)

on Jul 14, 2021 at 8:21am   •  0 likes

I got a different error this time, but i could log in to that link with these credentials


1626276092098.png

on Jul 14, 2021 at 8:25am   •  0 likes

Why you remove the country code 1? And don't post your user name and password here. Remove the attachment!

on Jul 14, 2021 at 8:35am   •  0 likes

10-4 removed. im still getting the same error

on Jul 14, 2021 at 9:03am   •  0 likes

I believe that the problem now is with your username and password. Double check them, make sure it is the exact credentials you login the service web.

on Jul 14, 2021 at 9:07am   •  0 likes

my password includes capitals, lower cases, and an !. would i have to escape any of that?

on Jul 14, 2021 at 9:09am   •  0 likes

Depends on the programming language and lib you use. Can be required for .NET.

Did you change your password since you post the screenshot?

on Jul 14, 2021 at 10:22am   •  0 likes

i havent changed the password, no.

on Jul 14, 2021 at 10:36am   •  0 likes

Then your password is incorrect. I used the password you accidentally shared this morning to login your sandbox service web and it failed. It also failed in my code which works 100% with my sandbox account.

on Jul 14, 2021 at 11:01am   •  0 likes

Here's the audit trail

1626285661872.png

on Jul 14, 2021 at 10:40am   •  0 likes

that is so weird... let me try changing the password maybe that will help. I used that password to log into the link you provided earlier.

on Jul 14, 2021 at 10:46am   •  0 likes

changed the password.. still no luck.

on Jul 14, 2021 at 11:01am   •  0 likes

Are you able to run Node JS, Python or PHP code? If not, email me your sandbox account password @ phong.vu@ringcentral.com



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