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

Help with class Server login #36

Closed
kyletov opened this issue May 14, 2021 · 3 comments
Closed

Help with class Server login #36

kyletov opened this issue May 14, 2021 · 3 comments

Comments

@kyletov
Copy link

kyletov commented May 14, 2021

Hello, I'm getting this error when trying to login using the Server class:

fmrest.exceptions.FileMakerError: FileMaker Server returned error 212, Authorization header 'Basic' invalid.

Any help or guidance on this would be great!

@davidhamann
Copy link
Owner

Does the error appear when attempting to login or after the initial login? Can you provide a code snippet and the full trace?

@kyletov
Copy link
Author

kyletov commented May 17, 2021

Hey, I just tried again and seems like I'm not running into that issue anymore, I got the impression that I needed to include data_sources when initializing fmrest.Server like data_sources=[{'database': 'Contacts', 'username': 'admin', 'password': 'admin'}] (from code docs).

When I removed it, I was able to login using the format below (same as the example from the docs):

>>> fms = fmrest.Server('https://your-server.com',
                        user='admin',
                        password='admin',
                        database='Contacts',
                        layout='Contacts')
>>> fms.login()
>>> record = fms.get_record(1)
>>> record.name
John Doe

@davidhamann
Copy link
Owner

Glad it works now. The data_sources is in fact only needed if you want to authenticate to additional DBs.

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