LINE
LINE copied to clipboard
How to setup argument in loginWithIdentityCredentialForCertificate()
Hi, I have a scenario. I will have many robots on different pcs in a intranet, and each pcs have its own virtual ip address.
- How to setup argument ip, computer name in loginWithIdentityCredentialForCertificate() in each robots?
- How LINE identify each robots? Thank you.
For IP address, you can add getter/setter in api.py.
For computer name you can set by passing 5th argument when init LineClient:
def __init__(self, id=None, password=None, authToken=None, is_mac=True, com_name="PC"):
In case that you want auto detect try editing api.py to set default IP by using this line:
import socket
ip = [(s.connect(('8.8.8.8', 80)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]
Source: http://stackoverflow.com/a/1267524/404906
Thanks for reply. I have some more questions:
- Will LINE server use ip address and device name to identify each client(robot)?
- If same LINE user account login 2 different robots, what's the result? will this be banned by LINE? Is this scenario workable?
- I don't know, maybe but unlikely since LINE will banned entire public IP if they found it's bots.
- First bots will got kicked out. Only LINE for Ipad and PC can be logged in at the same time.