adva-materials icon indicating copy to clipboard operation
adva-materials copied to clipboard

Network connection does not work anymore

Open Scythal opened this issue 3 years ago • 2 comments

It seems the network API does not connect anymore. It's hard to say exactly where since the application has been made unnecessarily complicated.

Scythal avatar Dec 23 '21 10:12 Scythal

Hello? Anyone still working on this project?

The problem is due to an "HTTP 401 Unauthorized" response from the server.

blueglyph avatar Jan 05 '22 16:01 blueglyph

I see that instead of "token_type": "Bearer" (documentation), we have TOKEN_TYPE = "Bearer " in ApiConstants.kt. It's even visible in the book. So I don't know if the extra space is a problem, but simply removing it doesn't solve the 401.

Trying to get the complete response in that spaghetti of a code is taking too much time. You should really re-do this with an easier and less convoluted example.

blueglyph avatar Jan 05 '22 17:01 blueglyph

Hi there! First of all, so sorry for the ridiculously late reply. I thought I had notifications on this, but apparently I didn't 🤦

I just went through the chapters, building the project from start to finish on each one, and never ran across this issue 🤔 from the looks of it, it seems that you're not using a valid API key / API secret. Did you get yours from https://www.petfinder.com/developers/?

rcosteira79 avatar Sep 03 '22 14:09 rcosteira79

Hi, thanks but it doesn't matter anymore, this can be closed.

blueglyph avatar Sep 03 '22 14:09 blueglyph