getAccessToken Procedure Errors
Error Type | Error Code | Example | Possible Reason and Solution |
---|---|---|---|
TYPE_PROCEDURE_PARAM | CODE_PROCEDURE_PARAM_VALUE_INVALID | Application Identifier <applicationKey> is not a string, null or number,boolean, object, array, empty string is invalid. Check the applicationKey parameter. | |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_GET_ACCESS_TOKEN_WRONG_APPLICATION_KEY | Procedure is called with Application Identifier <applicationKey> that is absent in Plugin's configuration. Do not call the procedure with an application differ from the applications that were received in the init method. | |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_GET_ACCESS_TOKEN_APPLICATION_NOT_CONFIGURED | Application Identifier <applicationKey> is not chosen in Plugin's configuration, or it's type is not supported by getAccessToken procedure. Choose an Application on Plugin Configuration Screen. | |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_GET_ACCESS_TOKEN_OFFLINE_NOT_SUPPORTED | The getAccessToken procedure is called while device is offline. Run procedure when the device is online. | |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_GET_ACCESS_TOKEN_PROCEDURE_TIMEOUT | Field Service couldn't get access token from server in 15 seconds. Usually such long timeout caused problems with internet connection or problems of Authorization server. Normally it should respond in 4 sec. | |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR |
CODE_PROCEDURE_FAILED |
"data": { "status": "no_access", "detail": "", "token": "" } |
Exceptional case. Contact administrator. |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR |
CODE_PROCEDURE_FAILED |
"data": { "status": "app_misconfigured", "detail": "", "token": "" } |
|
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "unexpected_response", "detail": "", "token": "" } |
Field Service got an unexpected response from Identity Provider. Token URL has wrong suffix. For IDCS the right one is https://{idcsUrl}/oauth2/v1/token |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "cannot_infer_user_id", "detail": "", "token": "" } |
The field of user should be filled. |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "token_service_error", "detail": "invalid_request", "token": "" } |
Check the scope field is not empty, in case of Fusion it is mandatory.Exceptional case. Contact administrator. |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "token_service_error", "detail": "invalid_client", "token": "" } |
|
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "token_service_error", "detail": "invalid_grant", "token": "" } |
Check the username is correct Check that certificate is valid The client type (IDCS application configuration) should be "Trusted" not "Confidential" (to generate self-signed user assertions). |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "token_service_error", "detail": "unauthorized_client", "token": "" } |
Check that OAuth client has authorization to use the requested grant. |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "token_service_error", "detail": "unsupported_grant_type", "token": "" } |
Exceptional case. Contact administrator. |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "token_service_error", "detail": "invalid_scope", "token": "" } |
Check the scope value |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR |
CODE_PROCEDURE_FAILED |
"data": { "status": "internal_error", "detail": "...", "token": "" } |
Exceptional case. Contact administrator. |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "connection_error", "detail": "", "token": "" } |
Field Service didn't get a valid response from Identity Provider. The reasons could be differ from timeout to wrong content. Check that Auth Server URL is correct. |
TYPE_PROCEDURE_GET_ACCESS_TOKEN_ERROR | CODE_PROCEDURE_FAILED |
"data": { "status": "unexpected_response", "detail": "", "token": "" } |
|
TYPE_PROCEDURE_ERROR | CODE_PROCEDURE_UNKNOWN | Check the procedure name | |
TYPE_INTERNAL | CODE_UNKNOWNCODE_JSON_INVALIDCODE_METHOD_NOT_SUPPORTED | Check JSON syntax and method that is sent |