Skip to content

401 Unauthorized when trying to get Client (credentials work / have worked for ~~10 months with rets-client) #1

@JayPerfetto

Description

@JayPerfetto

I am facing a 401 Unauthorized when trying to migrate my existing RETS client implementation to your package (I currently use https://www.npmjs.com/package/rets-client). Using the same credentials that work with that package, I get an Auth error - do you have any suggestions for what I may be missing? I noticed that package uses RETS 1.7.x and a different node engine, but I tried to bring your code down locally and change those values and got the same auth failure.

Thanks for any tips you might have!

loginUrl = https://pt.rets.crmls.org/contact/rets/login

const retsConfig: IRetsClientOptions = {
    username: clientSettings.username,
    password: clientSettings.password,
    url: loginUrl,
    format: RetsFormat.CompactDecoded,
};

try {
    console.log("Fetching Latest CRMLS Properties");
    await getClient(retsConfig, async ({ search }) => {
        console.log('connected!') // never reaches this log
    });
} catch (error) {
    console.log(error)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions