I want to access a specific photo via the Unsplash API and a given photo ID. Unfortunately my approaches didn't succeed and it seems that no other person on google tried it yet.
Prerequisite
- Register at unsplash developers to get your access key.
Unsplash API Documentation
As stated here:
Endpoint: https://api.unsplash.com/
GET /photos/:id
Provide as a parameter the photo's id as well as your access key:
- Example photo: https://unsplash.com/photos/nDV6ahWLvEg
- Last part is the photo id (I assume, based on readings I did):
nDV6ahWLvEg
- Last part is the photo id (I assume, based on readings I did):
- Provide your access key as
client_id
, e.g.123123123123
My full GET string:
https://api.unsplash.com/photos/:id?id=nDV6ahWLvEg&client_id=123123123123
Error Response
I always get an 404 - Couldn't find photo
. Authorization works, tried this with other unsplash endpoints. Tried to access it via python ´request` package and Insomnia (REST Client), both the same error. Tried also the "collections endpoint" who also needs an id (collection id) - error 404.
I assume that I do something wrong with the :id ? id = ...
Has anybody an idea? Thanks.