How to Make Rest Call from Cisco Unified CCX editor - cisco

The Problem is im trying to enter URL in properties of Make Rest Call but every time I enter something it shows this error

So, basically the problem was when I removed the https:// from my URL it allowed me to type URL and other information.

Related

Unable to add expo redirect Uri to the Azure AD B2C applications

I am trying to implement Azure b2c using expo-auth-session. After the login on the browser and redirecting back to the app I get following error.
"error": "redirect_uri_mismatch",
"error_description": "AADB2C90006: The redirect URI 'https://auth.expo.io/#username/app-slug' provided in the request is not registered for the client id 'XXXXXXXX-XXXX-XXXXX-XXXXX
Timestamp: 2021-10-13 11:08:53Z
When I try to add it under the redirect Uri, I get the error shown in the attached image.
Removing the # from the username fixes the error but then it will not redirect back to the app.
Thanks in advance!!!
I dealt with this same problem. The validation is a bug in the Azure UI.
You can get around it by grabbing a valid request from the Chrome developer tools, modifying it to insert the # symbol (e.g. grab a successful save without the # symbol) from the network tab. It will looks something like this:
Then right click that row for the request that was just made, "Copy" -> "Copy as cURL"
Get that text, paste it in a text editor where you can modify the inputs. You should be able to find the value that was modified in this request, and you can add in your # symbol now.
Copy / paste it into your terminal so you can make the request, and, it'll work :) The server does not restrict the # symbol from being there.

I set my telegram bot webhook, but do not send the telegram. Why?

I set webhook my telegram bot with setwebhook method but when I send a message in bot don't take this in my URL.
https://api.telegram.org/bot<token>/setwebhook?url=https://www.example.com/bot/temp.php
In my host I use PHP language for take and analysis and answer that. and I user this command for get updates from bot.
$update = file_get_contents(“php://input”);
But after run this line $update is empty.
I haven't problem with take updates without setwebhook bot when I use webhook don't take data.
result run getWebhookinfo is:
{"ok":true,"result":{"url":"https://example.com/bot/temp.php","has_custom_certificate":false,"pending_update_count":0,"max_connections":40}}
Do I have to be true "has_custom_cere"?
Thanks for help me
Mohammad, I think a PHP error occurred when telegram sends the request to you. Following code should works fine for getting the Telegram request.
$json = file_get_contents('php://input');
$request = json_decode($json);
I think your script stop before this code. I suggest you to enable PHP debug mode and check the error log.
You can find out problem via following method:
Check getWebhookInfo method, make sure your webhook URL is correct, and no last_error_message field.
POST similar data to your server, here is some data you can use in curl -d JSON, just copy it and run on your own server.
At last, check your CDN config (if you had applied on that server), temporary disable flooding or any check.
What is the outcome of the /getwebhookinfo method and could you post it here?
Please check if you SSL certificate valid (happend once to me) and what shows if you call the website in your browser (any php errors?).
I would have commented that, but I don´t have enough rep... Sorry :/
Please follow this way and if you don't get answer, your PHP has problem :
1- Revoke your Auth Key from BotFather by typing /revoke
2- Reset your Webbhook by new Auth Key :
https://api.telegram.org/bot<token>/setWebhook?url=https://www.website.com/bot_path
Notice #1 : setWebhook is case sensitive and W keyword must be capital.
Notice #2 : If you're using CMS such as Codeigniter, Laravel, Zend etc. It doesn't need to put .php after your bot_path and if not use it.
Notice #3 : If you want to delete last Webhook that you have set, You just need to write above url without ?url= at the rest.
3- After all you receive this message from telegram :
{"ok":true,"result":true,"description":"Webhook was set"}
Now you can test your Bot, But be aware that do this way to check your Auth Key and If there is no problem, absolutely your PHP code has problem. If you have problem yet please contact me on website to solve it Graphap and then put the right answer here.
I've told to recheck this way because I had problem frequently because of Auth Key which not working But now it works as well.

"Could not determine customer compid" USER_ERROR in netsuite sandbox

I have a User event which calls a restlet using nlapiRequestURL() method. The URL, headers and authorization seems fine but it returns an error message saying - "Could not determine customer compid". Has anyone had the same issue earlier or know how to work around with this. Any help is appreciated.
We see this occassionally when a Suitelet or Restlet URL isn't specific enough for NetSuite to know which company is trying to call the URL. The script id by itself is not enough to know the company if the user is not currently logged in to NetSuite.
You can add &compid=<YOUR NETSUITE ACCOUNT NUMBER> to the the URL to let NetSuite know which company is trying to call the specific URL.
Just adding this on because I had the same issue, you'll get the same error if you're hitting a sandbox and not capitalizing the SB in nlauth_account.
Eg NLAuth nlauth_account=XXXXXXX_SB1 instead of NLAuth nlauth_account=XXXXXXX_sb1.
We did face this issue, clearing browser cookies solved in most cases.
Sometimes the problem was persistent for about few hours and got fixed on its own.
If you're using NLAuth, be sure you use commas (not spaces) to separate the account, email, and signature fields. Using spaces gave me this error.

Flickr API - Custom URL to NSID

I'm trying to fetch the user information and images when I have a URL that is from flickr, however I cannot figure out how to get the username or user_id from the custom URLs.
The custom URL are with the following format.
https://www.flickr.com/photos/tataouane/
However the "tataouane" is not a NSID or a username that I can use the methods to fetch the information.
If I read the documentation I get the following:
URLs to photo and profile pages use either the user's NSID (the number with the '#' sign in it) or their custom URL (if they've chosen one). You can find their custom URL with a call to flickr.people.getInfo.
But to call the flickr.people.getInfo I need an NSID, and I want precisely the opposite.
I've tried to double check and the flickr.people.findByUsername return an "User not found" error message (as it should).
How can I get the NSID? Any ideas?
Thanks a lot!
OK, I found the solution and I hope this will help someone.
There's another API method that can be used that parses the URL into a NSID and username.
www.flickr.com/services/api/explore/flickr.urls.lookupUser
Flickr discussion here:
https://www.flickr.com/groups/api/discuss/72157649116650355/#comment72157649063153796

Post Username & Password To Protected Folder/Site

I'm trying to post a username & password from an HTML form to a protected folder on a website? Is this possible? I thought I just pass in a syntax in the URL like the below but not having any success
http://username:password#theurlofthesite.co.uk
I'm still getting the alert pop up asking for the username and password? I need to be able to auto log the person in..
Hope someone can help? Thanks
If you login via a HTML form, then this won't work. This is only for HTTP authentication, which is something else completely different.
I don't think many (any?) browsers support being opened to post data. Which leaves you hoping that the site accepts GET based logins (and they should be shot if they do.).
The address part of the URL is parsed by your web server, so the code which handles the HTML form never sees it.
If you want to pass parameters to a form, you must use url?field=value&field2=value2. This only works with forms that use the GET action. For POST, you need a program to generate an encoded document and upload that.
In both cases, your user name and password are broadcasted as plain text on the Internet, so the account will be hacked within a few hours. To put it more clearly: There is no way to "protect" the data in this folder this way. This is like adding a door with four locks to your house and keep the keys on a nail in a post on the street next to the door.
I did exactly what I did in the question and it works on all browser except Safari on a Mac

Resources