REST API Connector request questions and problems

Hello,

I have some questions and any help will be very appreciated.

Problem 1
I have a password text input. How can I make it secure? I only see the Text, Url and Email options in the Text Type setting.


I have a REST API Connector RegisterUser that makes a request to the 3rd part service (1). If operation is successful I’d like to show an alert with the corresponding message (2). If it fails I want to show the error alert (3).

Problem 2 - even when I have the 200 response with correct response object the error alert is triggered instead of the successful one :thinking:.

Problem 3 - when the operation really fails (5), how can I get that error message and put it to some variable to represent in the alert (3) message? It seems like I only can choose the fields from the successful response but not from the failed one (6).

Regards,
Olha

Question
How can I use the SETTOKV function after my REST API has been executed in the button action?

Also I want to say that Problem 2 is solved now but I found an issue - when the field in my response contains the - symbol, this value is ignored. E.g. the user-token from output.
I receive it in the response

blUserLocale: "en"
created: 1607522752000
email: "test@test.com"
lastLogin: 1607599391548
name: null
objectId: "17CAC3BA-FA75-4C24-B45D-D53BEDF29C4B"
ownerId: "17CAC3BA-FA75-4C24-B45D-D53BEDF29C4B"
socialAccount: "BACKENDLESS"
updated: null
user-token: "E593D458-2AF7-4CE5-8712-4263B1246E92"
userStatus: "ENABLED"
___class: "Users"

And put it into the userToken variable:

And after that I see that this variable is empty while the login.email, login.status and other variables without the hyphen symbol works fine.

Anyone here?

@olga

Please find the response to each problem below -

Problem 1 -
We already provide a seperate user management using Users Sheet where user access to the App after successul login. So, User login is already handled by DronaHQ.
Are you looking for a different use case? Will it be possible to share your use case to understand it better?
Also, if you want to hide it from end user, there is a hidden property for individual controls.

Problem 3 -
Its there is our Roadmap to provide support for Multiple responses for a same Api and then make it available while using the Apis. There is however a workaround where in While you are Configuring the Api and calling it using test & Save option, if your Api responds in all possible keys - Both for success and failure scenario, then all the keys will be made available when you are using your Api in your App.

Also, We are getting this checked where Key names in responses having β€œ-” are being ignored.

Hope this Helps!

1 Like

Hello @fenil.jain,

Thanks for your reply,

Problem 1
E.g. I use DronaHQ to build my UI but I store my data in the 3rd-party database (e.g. Backendless). I don’t want to duplicate my users data between several databases, just to let them enter their credentials and register them in the Backendless database using the REST API Connector.

Problem 3
Unfortunately, the server sends different responses for success and error so it would be cool if you provide support for multiple responses.

We are getting this checked where Key names in responses having β€œ-” are being ignored.

Thanks!

Regards,
Olha

@olga

For Problem 1 - We have added additional Password type option under Input Type property in Text control that you can now use.
image

For Problem 3 - As a temporary workaround, you can take the entire OUTPUT response in a Variable and then perform custom handling if you are using only in Workflow then use Code Block task OR by writing your own Custom Function (Extension > Function Editor) in case you want to reuse it in multiple places

Update : We are able to replicate this issue, we will be fixing this issue in this week. Will let you know once done

Hope this Helps!

1 Like

Thank you! Will be waiting for those fixes.