Unsplash\Exception: ["OAuth error: The access token is invalid"] in Unsplash\Endpoint::__callStatic() (line 98 of /opt/drupal/vendor/unsplash/unsplash/src/Endpoint.php).

Created on 11 July 2023, 12 months ago
Updated 28 July 2023, 11 months ago

Problem/Motivation

When trying to use an image URL and then when clicking the Add button, nothing happens and the error in logs is:

Unsplash\Exception: ["OAuth error: The access token is invalid"] in Unsplash\Endpoint::__callStatic() (line 98 of /opt/drupal/vendor/unsplash/unsplash/src/Endpoint.php).

This is happening because the unsplash library does not use 'access_key' and 'secret_key' but rather 'applicationId' and 'secret' (line 73 in vendor/unsplash/unsplash/src/HttpClient.php).

Steps to reproduce

Open up a media field and try to use an image URL (e.g. https://unsplash.com/photos/851_Smpkk-U).

Proposed resolution

Patch.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania andreic

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024