Closed miguelmartins17 closed 1 year ago
@miguelmartins17 this is how I would record this issue:
Giphy error
An error occurred.
GiphyClientError{statusCode: 403,
exception: {"message":invalid authentication credentials"}
}
That way other people facing this issue will find this issue when they Google and they will also discover your (eventual) solution to the problem.
@nelsonic I've tried to find the solution to this mistake, but all the solutions none of them happened with Flutter.
@miguelmartins17 keep sharing comments for what you are trying. youtu.be/yKYK1xt-kKo
Remember to git push
the code you have written to GitHub so that others can help you debug.
We have many examples of "debugging threads" on GitHub e.g: https://github.com/dwyl/learn-devops/issues/19
Each comment shows the step the person has taken while attempting to solve a challenge.
Comments == Effort
(more comments means more effort. keep trying and sharing what you try
)
@nelsonic I'm trying to see if the problem was the API key so I went to https://developers.giphy.com/ to get a new one and try again.
So apparently the problem wasn't with the API key.
And ... what was the problem?
The suspense is killing me.
@nelsonic I haven't figured it out yet to show images of but to show the gif not. I've been looking at these two articles but I can't find a solution.
For the gif animations: https://pub.dev/packages/gif_ani#-readme-tab-
Cool. keep going. you're almost there. 👨💻
@nelsonic This is complex. 😕
I don't know if this will help anyone else but I was getting the same response from giphy
Object { "message": "Invalid authentication credentials", }
After almost breaking my computer i realized I did not add an ampersand after my API key before i declared the next URL parameter.
This works
const BASE_URL = 'http://api.giphy.com/v1/gifs/search';
const resJson = await fetch(${BASE_URL}?api_key=${API_KEY}**&**q=${this.state.search}&limit=20
This did not and caused the error
const BASE_URL = 'http://api.giphy.com/v1/gifs/search';
const resJson = await fetch(${BASE_URL}?api_key=${API_KEY}q=${this.state.search}&limit=20
@kennethbrent thanks for sharing! ☀️
Still getting the same error , even after changing the API key. Trying to understand how can I get the credentials right.