Problems with Tenor and Imgur

Has anyone been able to get these two apps to work?
The apps installed, but searches come up empty.

Hi!

Just installed both Apps, all working fine in 5.3.0

What version are you running?

Bear in mind that you Rocket.Chat instance needs Internet access in order to grab the previews an the chosen image.

Let me know if this helps :slight_smile:

I’m very new. So I likley messed something up on my end.
I’m on 5.3.0
Giphy works just fine and I can access the server from the internet and it can get out to the internet.

Can you see any outstanding logs on both the browser console and server logs?

This is probably (well, usually is) something on your network as on a new fresh install it works just fine :grimacing:

Feel free to also reach our Community at Rocket.Chat
so you can have a more direct support :slight_smile:

1 Like

From the Debug I am seeing the following.
debug: 2022-11-22T16:22:35.478Z Caller: apply → apply

[
  "Did not get a valid response",
  {
    "url": "https://api.imgur.com/3/search/?q=cat",
    "method": "get",
    "statusCode": 403,
    "headers": {
      "accept-ranges": "bytes",
      "access-control-allow-credentials": "true",
      "access-control-allow-headers": "Authorization, Content-Type, Accept, X-Mashape-Authorization, IMGURPLATFORM, IMGURUIDJAFO, sessionCount, IMGURMWBETA, IMGURMWBETAOPTIN, X-expSNKPK127, X-Imgur-Defender-Bypass",
      "access-control-allow-methods": "GET, PUT, POST, PATCH, DELETE, OPTIONS",
      "access-control-allow-origin": "*",
      "access-control-expose-headers": "X-RateLimit-ClientLimit, X-RateLimit-ClientRemaining, X-RateLimit-UserLimit, X-RateLimit-UserRemaining, X-RateLimit-UserReset, Geo-City, Geo-Region, Geo-Metro-Code, Geo-Country-Code",
      "cache-control": "no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
      "connection": "close",
      "content-encoding": "gzip",
      "content-type": "application/json",
      "date": "Tue, 22 Nov 2022 16:22:35 GMT",
      "etag": "W/\"147daab27ce3d042756d19ca69b473eb7d0bf78b\"",
      "server": "cat factory 1.0",
      "transfer-encoding": "chunked",
      "vary": "Accept-Encoding",
      "x-cache": "MISS, MISS",
      "x-cache-hits": "0, 0",
      "x-frame-options": "DENY",
      "x-served-by": "cache-iad-kiad7000080-IAD, cache-bfi-krnt7300036-BFI",
      "x-timer": "S1669134155.393328,VS0,VE80"
    },
    "content": "{\"data\":{\"error\":\"Invalid client_id\",\"request\":\"\\/3\\/search\\/\",\"method\":\"GET\"},\"success\":false,\"status\":403}",
    "data": {
      "data": {
        "error": "Invalid client_id",
        "request": "/3/search/",
        "method": "GET"
      },
      "success": false,
      "status": 403
    }
  }
]

That’s strange.

Looks like something on imgur side. Maybe some geo block?

OK, My server is in the US. Where do I go from here?

where you able to get the client_id?

Maybe it will allow a few request and cap it after a certain amount of requests.

Sorry, I’m very new. Client_id? Where do I get that?

Current install is 5.3.3. I can try to do the update today.
When you say links you mean something like this:
In the channel I type in: /imgur cat
I get a message box just above the entry box saying no results found.
same things happens with /tenor cat
but with /giphy cat I get results.

if you go to ADMIN/WORKSPACE > APPS > INSTALLED > IMGUR

it will have a place where you can add the client_id that you can get from IMGUR.

I tested it locally, and it worked fine, but I am not sure if it will require a client_id after a certain amount of requests.

I have the imgur Client ID filled out.

I’m glad I’m not the only one! Sorry. Hopefully we can find a solution.

Here is the code for the Imgur App, where you can find the default client id (9f75b03f6156b08)

If there is no client id, it will default to that one.

can you try adding it?

I added an invalid client_id and was able to reproduce it all you mentioned.

Note: I was able to use the APIs even without client_id, so I think it’s non mandatory, check it out:

https://api.imgur.com/3/search/?q=cat

the link to the image will be at the link parameter.

Sorry. I’m running out of docker. I’m not sure where this is for me to look at.

For imgr, paste this as your token in App Settings: 9f75b03f6156b08

tenor must be something similar

THAT WORKED for Imgr. Thank you!!!