Unable to get API access_token

Keywords: SuiteCRM - AWS - Technical issue - Application configuration

bndiagnostic ID: 332d38f0-44c0-f6c9-e460-98239891d9c7

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Description:
Tue May 24 14:27:46 2022 [7370][-none-][FATAL] [ERROR] [Invalid Payload Response]{“errors”:[{“id”:“1”,“links”:{“about”:null},“status”:“200”,“code”:0,“title”:“JSON API Error”,“detail”:“JSON API Error occurred.”,“source”:{“pointer”:null,“parameter”:null},“meta”:{“about”:“Exception”,“class”:“InvalidArgumentException”,“code”:0,“debug”:{“message”:“It was not possible to parse your key, reason: “,“file”:”/bitnami/suitecrm/vendor/lcobucci/jwt/src/Signer/OpenSSL.php”,“line”:90,“trace”:[{“file”:"/bitnami/suitecrm/vendor/lcobucci/jwt/src/Signer/OpenSSL.php",“line”:47,“function”:“validateKey”,“class”:“Lcobucci\JWT\Signer\OpenSSL”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/lcobucci/jwt/src/Signer/OpenSSL.php",“line”:21,“function”:“getPrivateKey”,“class”:“Lcobucci\JWT\Signer\OpenSSL”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/lcobucci/jwt/src/Signer/BaseSigner.php",“line”:36,“function”:“createHash”,“class”:“Lcobucci\JWT\Signer\OpenSSL”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/lcobucci/jwt/src/Builder.php",“line”:470,“function”:“sign”,“class”:“Lcobucci\JWT\Signer\BaseSigner”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/lcobucci/jwt/src/Builder.php",“line”:450,“function”:“createSignature”,“class”:“Lcobucci\JWT\Builder”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/league/oauth2-server/src/Entities/Traits/AccessTokenTrait.php",“line”:39,“function”:“getToken”,“class”:“Lcobucci\JWT\Builder”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/league/oauth2-server/src/ResponseTypes/BearerTokenResponse.php",“line”:27,“function”:“convertToJWT”,“class”:“SuiteCRM\API\OAuth2\Entities\AccessTokenEntity”,“type”:"->"},{“file”:"/bitnami/suitecrm/lib/API/OAuth2/Middleware/AuthorizationServer.php",“line”:247,“function”:“generateHttpResponse”,“class”:“League\OAuth2\Server\ResponseTypes\BearerTokenResponse”,“type”:"->"},{“file”:"/bitnami/suitecrm/lib/API/v8/Controller/OAuth2Controller.php",“line”:71,“function”:“respondToAccessTokenRequest”,“class”:“SuiteCRM\API\OAuth2\Middleware\AuthorizationServer”,“type”:"->"},{“function”:“authenticate”,“class”:“SuiteCRM\API\v8\Controller\OAuth2Controller”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php",“line”:40,“function”:“call_user_func”},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/Route.php",“line”:281,“function”:"__invoke",“class”:“Slim\Handlers\Strategies\RequestResponse”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",“line”:117,“function”:"__invoke",“class”:“Slim\Route”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/Route.php",“line”:268,“function”:“callMiddlewareStack”,“class”:“Slim\Route”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/App.php",“line”:503,“function”:“run”,“class”:“Slim\Route”,“type”:"->"},{“file”:"/bitnami/suitecrm/lib/API/OAuth2/Middleware/ResourceServer.php",“line”:109,“function”:"__invoke",“class”:“Slim\App”,“type”:"->"},{“function”:"__invoke",“class”:“SuiteCRM\API\OAuth2\Middleware\ResourceServer”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/DeferredCallable.php",“line”:57,“function”:“call_user_func_array”},{“function”:"__invoke",“class”:“Slim\DeferredCallable”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",“line”:70,“function”:“call_user_func”},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/MiddlewareAwareTrait.php",“line”:117,“function”:“Slim\{closure}”,“class”:“Slim\App”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/App.php",“line”:392,“function”:“callMiddlewareStack”,“class”:“Slim\App”,“type”:"->"},{“file”:"/bitnami/suitecrm/vendor/slim/slim/Slim/App.php",“line”:297,“function”:“process”,“class”:“Slim\App”,“type”:"->"},{“file”:"/bitnami/suitecrm/lib/API/core/app.php",“line”:101,“function”:“run”,“class”:“Slim\App”,“type”:"->"},{“file”:"/bitnami/suitecrm/lib/API/public/index.php",“line”:5,“args”:["/bitnami/suitecrm/lib/API/core/app.php"],“function”:“require_once”}],“traceAsString”:"#0 /bitnami/suitecrm/vendor/lcobucci/jwt/src/Signer/OpenSSL.php(47): Lcobucci\JWT\Signer\OpenSSL->validateKey()\n#1 /bitnami/suitecrm/vendor/lcobucci/jwt/src/Signer/OpenSSL.php(21): Lcobucci\JWT\Signer\OpenSSL->getPrivateKey()\n#2 /bitnami/suitecrm/vendor/lcobucci/jwt/src/Signer/BaseSigner.php(36): Lcobucci\JWT\Signer\OpenSSL->createHash()\n#3 /bitnami/suitecrm/vendor/lcobucci/jwt/src/Builder.php(470): Lcobucci\JWT\Signer\BaseSigner->sign()\n#4 /bitnami/suitecrm/vendor/lcobucci/jwt/src/Builder.php(450): Lcobucci\JWT\Builder->createSignature()\n#5 /bitnami/suitecrm/vendor/league/oauth2-server/src/Entities/Traits/AccessTokenTrait.php(39): Lcobucci\JWT\Builder->getToken()\n#6 /bitnami/suitecrm/vendor/league/oauth2-server/src/ResponseTypes/BearerTokenResponse.php(27): SuiteCRM\API\OAuth2\Entities\AccessTokenEntity->convertToJWT()\n#7 /bitnami/suitecrm/lib/API/OAuth2/Middleware/AuthorizationServer.php(247): League\OAuth2\Server\ResponseTypes\BearerTokenResponse->generateHttpResponse()\n#8 /bitnami/suitecrm/lib/API/v8/Controller/OAuth2Controller.php(71): SuiteCRM\API\OAuth2\Middleware\AuthorizationServer->respondToAccessTokenRequest()\n#9 [internal function]: SuiteCRM\API\v8\Controller\OAuth2Controller->authenticate()\n#10 /bitnami/suitecrm/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func()\n#11 /bitnami/suitecrm/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke()\n#12 /bitnami/suitecrm/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke()\n#13 /bitnami/suitecrm/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack()\n#14 /bitnami/suitecrm/vendor/slim/slim/Slim/App.php(503): Slim\Route->run()\n#15 /bitnami/suitecrm/lib/API/OAuth2/Middleware/ResourceServer.php(109): Slim\App->__invoke()\n#16 [internal function]: SuiteCRM\API\OAuth2\Middleware\ResourceServer->__invoke()\n#17 /bitnami/suitecrm/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()\n#18 [internal function]: Slim\DeferredCallable->__invoke()\n#19 /bitnami/suitecrm/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()\n#20 /bitnami/suitecrm/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}()\n#21 /bitnami/suitecrm/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack()\n#22 /bitnami/suitecrm/vendor/slim/slim/Slim/App.php(297): Slim\App->process()\n#23 /bitnami/suitecrm/lib/API/core/app.php(101): Slim\App->run()\n#24 /bitnami/suitecrm/lib/API/public/index.php(5): require_once(’…’)\n#25 {main}"}}}],“meta”:{“suiteapi”:{“major”:8,“minor”:0,“patch”:0,“stability”:“ALPHA”}},“jsonapi”:{“version”:“1.0”}}

Hi Team,

We are able to access front end fine, but when we are trying to access API’s these are throwing errors.
{
“error”: “unknown_error”,
“message”: "It was not possible to parse your key, reason: "
}

In the UI it looks like it had created a Access Token record ID without the JWT

Hi @suitecrm_dev_1,

We replied in this duplicate thread:

Regards,
Michiel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.