My OCR app With OCR.space API isn’t Working.
The Text Is Returning null.
Please Help Me.
- Try changing the variable Vaue to null instead of true while defining it. (Perhaps Value is its name)
- Try getting the error part of the output and display it in a separate label from the Web API Get function.
- Check if your API key is correct or not.
Does the full url in your API Get call work in a browser (outside of Thunkable)? If so, post the full JSON response you’re getting as text (not a screenshot) and we can see if the way you’re parsing it is correct.
If it works in a browser, what happens if you set a text input’s text to the green response block? Can you copy the value that is displayed and paste it here?
I changed the variable to null, added error blocks, I also Created My New API.
Still, the text is showing null
You need to change your blocks to the following
See my sample project
https://x.thunkable.com/projectPage/61d9a805c2bd1000108410a6
Still It’s Showing “null”.
It runs as expected with me
Check your API configuration and the way you parse the image URL with it.
Remember that API expects a fully qualified URL for the image and will not work with an image saved in your local machine or an image that is stored in the project assets. You need the image to be accessible from a web server or cloud storage.
My API was Working And Here’s my Code-
@muneer’s project works correctly with my free API key:
But I’m confused now… are your blocks working for you or not?
Part of the problem may be that you are assigning a boolean type (true) to the app variable Vaue and then later assigning it a text string type from the API response. Using multiple types in a single variable can cause problems.
Try removing the [true] block from the [initialize] block and see if that helps.
You’ve also removed the list block that @muneer told you you needed!
Also, it’s hard to help you because you never answered my questions:
Here’s When I tested the URL with a Sample Image URL, these Were The Results:
Thanks, @muneer for Your Help!
There were Some mistakes I did But thanks for helping!