Getting an invalid API key error


From Service Pack 7 of BMC Release Process Management 5.0, after regenerating the API key, the user will get the following Invalid API Key error, if the API token is not passed within single quotes:

HTTP/1.1 403 Forbidden
Cache-Control: no-cache
X-Rack-Cache: miss
X-XSS-Protection: 1; mode=block
X-Request-Id: 18a331e7544527345dc1c9af0f6cb195
Referrer-Policy: origin-when-cross-origin
Date: Thu, 28 Apr 2022 06:54:53 GMT
Connection: keep-alive
Strict-Transport-Security: max-age=631152000; includeSubdomains; preload
Transfer-Encoding: chunked
Public-Key-Pins: max-age=5184000; pin-sha256="abc"; pin-sha256="123"; report-uri="https://report-uri.io/example-hpkp"; includeSubDomains
X-Permitted-Cross-Domain-Policies: none
X-Download-Options: noopen
X-UA-Compatible: IE=Edge,chrome=1
X-Frame-Options: DENY
Vary: Origin
X-Content-Type-Options: nosniff
X-Runtime: 0.049000
Content-Type: application/json;charset=utf-8


{"error":{"response":"Invalid API Key"}}

To resolve this error, the user must pass the API key within single quotes in curl commands.

Example
curl -i -H "accept: application/json" -X GET http://[rails_host]/v1/apps?token='$2a$10$aXSI7ymCJKXWvaH.rqeAhO3gND5U2kFlGHnR7vUAVsXnaCZAn1hpC'

Related topic

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*