Jacob
April 16, 2025, 6:56pm
1
I just created an account, but I can’t use it to make API requests.
I use Postman for my API requests.
I already tried:
Changing my account password
Remove any special characters from my password
Postman does encode the username and password for Basic Auth
We think we’ve found the problem and pushed a fix. Please try again.
1 Like
I’m ran into a similar problem, and I think you solved it. The TL;DR is “your email isn’t your username”.
Workflow has been:
Create new account, use spaces and special characters out of force-of-habit
Attempt to replicate the query at the bottom of RouteXL API | RouteXL
curl \
--url https://api.routexl.com/tour/ \
--user <username>:<password> \
--data 'locations=[{"address":"1","lat":"52.05429","lng":"4.248618"},{"address":"2","lat":"52.076892","lng":"4.26975"},{"address":"3","lat":"51.669946","lng":"5.61852"},{"address":"4","lat":"51.589548","lng":"5.432482"}]&skipOptimisation=true'
Realize that the special characters might be hindering things. Change to an alphanumeric password instead.
Run attempted query again, within 20 minutes.
401-errors.
Attempt hello world query
curl -v --user "<email>:<password>" https://api.routexl.com/status/Hello+world
< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Fri, 25 Apr 2025 18:59:35 GMT
< Content-Type: text/html;charset=UTF-8
< Content-Length: 0
< Connection: keep-alive
< X-Powered-By: PHP/7.4.33
Authentication problem. Ignoring this.
< Www-Authenticate: Basic msg=“Protected”
Attempt again, swapping username for the email.
Works. 200.
Thank you for your feedback. We can confirm indeed that while the website accepts the username or email address to log in, the API accepts the username only. We’ll add that to the documentation.