Comments (10)
You must recalc the auth hash and set a new date header for each call. Are you doing that?
from docs-api.
@daveajones
Thank you so much for your fast reply.
I absolutely do that. Every time I do a new request to the api, I create the authorization with the new timestamp.
If anything else was the problem, should I get a different error message?
What would be helpful would be a way to see the actual request the API gets. Something like a requests log at the backend. With the headers and all the data, and the response code somewhere. Even if it was just a plain log file shown at a page. Is this possible?
from docs-api.
I put in some debug for this specific issue. Try it again. I'll look at giving back more detail once I get some other stuff off my plate.
from docs-api.
@daveajones
That is awesome. Here is the output I got on the request.
This Server time means that this is the one that is compared the request time to?
X-Auth-Date header value is not within the +/- 3 minute time window. Please see: https://podcastindex-org.github.io/docs-api/#overview--authentication-details
Debug
Server time: 1631642994
Headers Received
X-Auth-Date: 1631646658
X-Auth-Key: CWN8YHEYKJDRPRE6PQSH
Authorization: 458c17b485e1e63931b7b020ae6821c051574115
User-Agent: MediaVault/1.3 (AmigaOS)
from docs-api.
Is the time you are sending UTC or local time? I tried to look at your code but wasn't sure what now()
returned.
from docs-api.
@stevencrader
Thank you so much for taking a look. Actually it doesn't take care of the timezone, and it is the time of user's machine. This is something I should take in account? It should be based on UTC or something else?
At the docs I see the following info:
The current unix epoch time as a string. 5 minute window.
This value is an integer; round down if needed. The value shall not include a decimal point.
from docs-api.
I believe the time needs to be UTC epoch time. You can compare the time reported in your app to the time reported here https://www.epochconverter.com/
from docs-api.
@stevencrader
That's great. At least now I can see what might be wrong. I will test it. and get back to you.
from docs-api.
@stevencrader I believe you are right. Changed my timestamp reducing by 1 hour, which is my timezone (UTC+1), and now I got data just fine.
I think that information must be added at the docs, for others to know.
Thank you both for your valuable help.
from docs-api.
Thanks guys.
from docs-api.
Related Issues (20)
- Multiple type issues HOT 1
- document optional properties HOT 1
- Podcasts byFeedId Endpoint bug HOT 4
- How to query episode based upon podcast? HOT 1
- Authenticate-free way of getting a feed and item information by GUID? HOT 2
- Podcasts By Feed ID endpoint `/podcasts/byfeedid` accepts non-numeric ids HOT 4
- Are URLs to podcasting platforms returned from the API? HOT 1
- Feature request: trailers API endpoint
- Feature request: add pagination for loading episodes
- Blocked by Cloudflare HOT 2
- Suggestion: Move Docs Site to Subdomain HOT 3
- Podcasts By Feed ID endpoint /podcasts/byfeedid multiple IDs returning unexpected results? HOT 12
- Incorrect description of title in by person schema HOT 1
- Enhancement - Update docs for /episodes/byfeedid, /episodes/byfeedurl, /episodes/bypodcastguid to include feedUrl, podcastGuid HOT 2
- Issue with /episodes/byfeedid with since parameter
- `/podcasts/byfeedid` returning `podcast` medium for `publisher` feed HOT 1
- Add some way to get remoteItems for a feed in the API? HOT 1
- Requesting API Endpoint via SST HOT 9
- Use of 'medium' in API not clear.. HOT 6
- Strange issue with /search/byperson HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs-api.