Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rackspace provider not getting token from the identity API

See original GitHub issue

Update: solved! See my comment below.

I’m just starting out with lexicon and trying to get it working with Rackspace Cloud DNS. Requests are failing with a requests.exceptions.HTTPError: 401 Client Error: Resource not found for validate token request error. With debugging on, it appears lexicon is not requesting a token from before it continues to submit a reqeuset to….

Here’s the command I’m running:

lexicon rackspace --log_level DEBUG --auth-username myusername --auth-api-key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX list A

And here’s the output:

Arguments: Namespace(action='list', auth_account=None, auth_api_key='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', auth_token=None, auth_username='myusername', content=None, delegated=None, domain='', identifier=None, log_level='DEBUG', name=None, output='TABLE', priority=None, provider_name='rackspace', sleep_time=1, ttl=None, type='A')
Starting new HTTPS connection (1): "GET /v1.0/None/domains? HTTP/1.1" 401 0
Traceback (most recent call last):
  File "/Users/q/src/dns-lexicon/env/bin/lexicon", line 10, in <module>
  File "/Users/q/src/dns-lexicon/env/lib/python3.7/site-packages/lexicon/", line 117, in main
    results = client.execute()
  File "/Users/q/src/dns-lexicon/env/lib/python3.7/site-packages/lexicon/", line 64, in execute
  File "/Users/q/src/dns-lexicon/env/lib/python3.7/site-packages/lexicon/providers/", line 69, in authenticate
    return self._authenticate()
  File "/Users/q/src/dns-lexicon/env/lib/python3.7/site-packages/lexicon/providers/", line 66, in _authenticate
    'name': self.domain
  File "/Users/q/src/dns-lexicon/env/lib/python3.7/site-packages/lexicon/providers/", line 142, in _get
    return self._request('GET', url, query_params=query_params)
  File "/Users/q/src/dns-lexicon/env/lib/python3.7/site-packages/lexicon/providers/", line 190, in _request
  File "/Users/q/src/dns-lexicon/env/lib/python3.7/site-packages/requests/", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Resource not found for validate token request for url:

Of course, this request will fail if is no token has been received from the API endpoint.

I’m happy to help troubleshoot, but I thought I’d ask first if I’m using the correct parameters for the rackspace provider.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

rmarschercommented, Feb 11, 2019

I submitted a pull request. With this change, I can do

lexicon rackspace list [DOMAIN] CNAME --auth-username [rackspace username] --auth-api-key [rackspace api_key]

and don’t need to specify any tenant/account ID. Thanks for the nudge @quinncomendant 👍

quinncomendantcommented, Feb 11, 2019

This looks great. Thanks @rmarscher

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication tokens - Rackspace
Use this operation to authenticate to the Rackspace Cloud by using either a password or API key and generate an authentication token. Submit...
Read more >
Quickstart for Identity — Rackspace Developer Portal 1 ...
The primary way to authenticate is through the generation of tokens: when credentials (such as your username and API key) are successfully validated,...
Read more >
Authenticate to the Rackspace Cloud
You get a token by submitting an authentication request with valid account credentials to the following Identity API service endpoint:.
Read more >
Identity provider — Rackspace Developer Documentation 1 ...
The Identity API service enables developers to manage authentication and authorization services for Rackspace services through a simple Representational ...
Read more >
Identity concepts — Rackspace Developer Documentation 1 ...
In the Rackspace Cloud, you authenticate by submitting a POST tokens API request with valid credentials to the Identity service endpoint. Credentials are ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found