[SOLVED ]Web api returning null value

This is my first time using web api component and i am making an app which gives random quotes
I am using goquotes api.
It gives a null value while running it; please help me


You need to provide more information.

Have you setup the Web API component with the requirements of your API service?
Is the API working fine from the browser directly?
If the API requires special setup, have you tested it with an API client such as Postman?

I ran a quick test using the API in the browser and I get results.

{"status":200,"message":"success","count":3,"quotes":[{"text":"Money will buy a pretty good dog, but it won't buy the wag of his tail.","author":"Josh Billings","tag":"money"},{"text":"I am a morning writer I am writing at eight-thirty in longhand and I keep at it until twelve-thirty, when I go for a swim. Then I come back, have lunch, and read in the afternoon until I take my walk for the next day's writing.","author":"Carlos Fuentes","tag":"morning"},{"text":"A gentleman is simply a patient wolf.","author":"Lana Turner","tag":"men"}]}
1 Like

yes it works in the browser very fine

Are you talking about the query parameters? if yes; I haven’t
Because I don’t know form where should we enter the values

1 Like

Can you share an image of the blocks you have for the Web API?

1 Like

Their GitHub page has the following note:

Note : The api will not work as it was hosted under free tier at Heroku & it has been exhausted due to high traffic. So clone and host your version of API and test them

Then again, it does seem to be working in a browser.

When parsing the JSON response, you need to convert the green response block to an object. So attach the “get object from JSON” block to it.

Also, you’ll need to get the “quotes” property first and then from that result, take a list item from it and get the “text” property.

1 Like

The green block response is not an object, it is a JSON string.

The other thing is the quotes object is a list so you need something like this to obtain the first quote of the list of quotes

Sample output

To avoid errors, you should first check that there is no errors then proceed with checking the status

1 Like

thanks, and what will be the api url?

1 Like

The same as you have in the image you sent.

I used this https://goquotes-api.herokuapp.com/api/v1/random?count=3

when I live test it the screen gets white

1 Like

This is the full code blocks and I pasted a sample output in a previous post and this is another.


thanks @muneer and @tatiang I got my mistake

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.