Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialokilydokily
12,105 PointsI get a 401 error.
I think it's because the section is out of date.
1 Answer
dodders
Python Development Techdegree Graduate 38,680 PointsThere are different URL's for different regions, and it seems the API key needs to be used with the right URL. On the screen where you get your API key it will show the URL for you to use. Replace the start of the URL used in the course to the URL you are given.
You can see the various URL's at the top of this page: https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics.V2.0/operations/56f30ceeeda5650db055a3c9
Cameron Abell
6,282 PointsCameron Abell
6,282 PointsThis worked great!
To clear up any confusion: Write everything exactly as she has it in the video. Then, replace the key with the one Azure gives you. Lastly, replace the beginning of the link used in the video with the endpoint link that Azure gives you. So, instead of "https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment" write "(Your Custom Endpoint Link)/text/analytics/v2.0/sentiment"