Attached images fails after personal token changed

When image is attached into body of Note or Activity link in format (below) is created

https://api-proxy.pipedrive.com/api/v1/files/41/download?api_token=....

And when I change my token in Interface - this link becomes invalid.

Hi @Han_Solo,

As your API token has been regenerated, the link will change as your token has changed. This has always been the case and needed when using the Pipedrive API v1 Reference endpoint.

@Nicole_Tan

But this happens with links that permanently placed inside body of note/activity. .

For example if person who placed this content with attached files gone away from company, we will disable his account (and his token!) and all those messages become corrupted

Hi @Han_Solo,

I asked our developers about this and this is what they told me.

The Note image has the API token as sent with the GET query, so
/ api /v1/notes/373?enabled=true& api _token={MY_CURRENT_ API _TOKEN}
will return:

“content”: “<a href="https://newotttest.pipedrive.com/api/v1/files/1385/download?api_token={MY_CURRENT_API_TOKEN}\” data-pipecid="cid:1385" rel="noopener noreferrer"><img src="https://newotttest.pipedrive.com/api/v1/files/1386/download?api_token={MY_CURRENT_API_TOKEN}\" data-pipecid="cid:1386">"

When this is changed, the link will match the changed API token so you need to request the Note again.

Unfortunately, if you are storing the Note content to your DB or storage, the pipedrive.com/ api /v1/files/1385/download? api _token={MY_CURRENT_ API _TOKEN} may not work as it will invalidate when the API token changes.

However, the asset is still available. You will need to use GET query to re-request the Note and the updated token will be reflected. This applies when the user with the correct permissions queries the / api /v1/notes/{NOTE_ID} endpoint (e.g. admin or regular user having permissions over the note). Removing the User will not delete the Notes.

I hope this helps?