Here is my url which i have to insert/make hyperlink of .
http://192.168.10.183:8080/xyzadsfgrghrh//Request?Key=eform_renderer&OwnerType=Prj&OwnerID=79061&ItemType=Aci&ItemID=20032785&ActionToPerform=View&PopupMode=Y&WindowOpenOnSave=Y&ALLOWREADACCESS=Y&FromECRGetUrl=Y&GetUrlReqParams=&ParentItemId=20032785&childProcessId=qq0k5l04Gd92FFB384jODPfA93D93D
.
The limit is of 255 characters.So how can i insert such a long url in my Kingsoft Writer ?
To get the shortened url dynamically from google API, first go here create your key or alternatively you can create one from credentails page for authorization so that google can verify you can send the shortened url.
Here is the sample code in python as how to proceed:
import requests
url = "https://www.googleapis.com/urlshortener/v1/url?key=YOUR_KEY"
headers = { 'Content-Type': 'application/json'}
payload = {"longUrl": "YOUR URL"}
r = requests.post(url, headers= headers, json=payload)
After success you will receive response like as mentioned on google-
{
"kind": "urlshortener#url",
"id": "YOUR SHORTENED URL",
"longUrl": "YOUR LONG URL"
}
Hope it helps.