The problem was on the online service side.
Closed
The goal is to retrieve product information via REST API for an EAN number.
I have registered a test-account at an online service and received an access token.
Despite the clear instructions and available code examples in various programming languages, I consistently receive a 'The requested URL was not found on this server' server response.
B4X:
Private Sub Button1_Click
Dim token As String = "----usertokenhere----"
Dim ean As String = EditText1.Text
Dim url As String = $"https://api.ean-search.org/api?token=${token}&op=barcode-lookup&format=json&ean=${ean}"$
Label1.Text = url
Label2.Text = "..."
Dim j As HttpJob
j.Initialize("", Me)
j.Download(url)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Label2.Text = j.GetString
Else
Label2.Text = j.ErrorMessage
End If
j.Release
End Sub
What is needed to make a successful API request?
A small Testproject is attached.
Since the number of requests for my current test account is limited, I prefer not to publish the token here.
However, I can send it via private message if needed.
Attachments
Last edited: