Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to setup argument in loginWithIdentityCredentialForCertificate() #63

Open
sschang123 opened this issue Jan 19, 2016 · 4 comments
Open

Comments

@sschang123
Copy link

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.

  1. How to setup argument ip, computer name in loginWithIdentityCredentialForCertificate() in each robots?
  2. How LINE identify each robots?
    Thank you.
@anusoft
Copy link

anusoft commented Jan 21, 2016

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"):

@anusoft
Copy link

anusoft commented Jan 21, 2016

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

@sschang123
Copy link
Author

Thanks for reply.
I have some more questions:

  1. Will LINE server use ip address and device name to identify each client(robot)?
  2. If same LINE user account login 2 different robots, what's the result? will this be banned by LINE? Is this scenario workable?

@anusoft
Copy link

anusoft commented Jan 21, 2016

  1. I don't know, maybe but unlikely since LINE will banned entire public IP if they found it's bots.
  2. First bots will got kicked out. Only LINE for Ipad and PC can be logged in at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants