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

Endpoint not found and Bearer token not set #121

Open
yogigrantz opened this issue Nov 1, 2022 · 0 comments
Open

Endpoint not found and Bearer token not set #121

yogigrantz opened this issue Nov 1, 2022 · 0 comments

Comments

@yogigrantz
Copy link

yogigrantz commented Nov 1, 2022

Describe the bug
using the API Key provided by HubSpot, I coded like this:

        ` 
        IHubSpotApi hs = new HubSpotApi(hapiKey);

        var contacts = hs.Contact.List();
        foreach (var c in contacts.Contacts)
        {
            Console.WriteLine(c.FirstName);
        }

        var companies = hs.Company.List();
        foreach (var company in companies.Companies)
        {
            Console.WriteLine(company.Name);
        }

    `

Expected behavior
I was expecting to see a list of contact first names and company names

Instead, for Contact.List() I was getting 404 page not found, and for Company.List() I was getting unauthorized.

The endpoints that the code was trying to get was: https://api.hubapi.com/contacts/v1/lists/all/contacts/allcount=20 for contacts and https://api.hubapi.com/companies/v2/companies/pagedcount=20 for companies

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

1 participant