Hello, everyone!
Trying to get access token for API using OAuth (SuiteCRM version 7.10.10)
What I’ve done already:
- Generated private and public key files for OAuth, as described here: https://docs.suitecrm.com/developer/api/version-8/json-api/#_generate_private_and_public_key_for_oauth2
- Configured auth access to some users (https://docs.suitecrm.com/developer/api/version-8/configure-authentication)
After that I try to call GET [color=#0088ff]http://[CRM_ROOT]/api/oauth/access_token?grant_type=client_credentials&client_id=4d4f9602-4599-16bd-18ea-5c23287b4c45&client_secret=somesecret[/color] and get an error:
{
"errors": [
{
"code": 8000,
"title": "[SuiteCRM] [API] [OAuth] Unable to generate private key",
"status": 400
},
{
"id": "1",
"links": {"about": null},
"status": 500,
"code": 8000,
"title": "JSON API Error",
"detail": "Api Version: 8",
"source": {
"pointer": null,
"parameter": null
},
"meta": {
"about": "Exception",
"code": 8000,
"langMessage": null
}
}
],
"meta": {"suiteapi": {
"major": 8,
"minor": 0,
"patch": 0,
"stability": "ALPHA"
}},
"jsonapi": {"version": "1.0"}
}
Here is an extract from my suitecrm.log:
Thu Dec 27 12:27:20 2018 [26627][-none-][DEBUG] Hook called: ::after_entry_point
Thu Dec 27 12:27:20 2018 [26627][-none-][DEBUG] Including module specific hook file for custom/modules
Thu Dec 27 12:27:20 2018 [26627][-none-][DEBUG] Including Ext hook file for custom/application
Thu Dec 27 12:27:20 2018 [26627][-none-][INFO] Found language file: en_us.lang.php
Thu Dec 27 12:27:20 2018 [26627][-none-][INFO] Found language file: ru_ru.lang.php
Thu Dec 27 12:27:20 2018 [26627][-none-][INFO] Found extended language file: en_us.lang.ext.php
Thu Dec 27 12:27:20 2018 [26627][-none-][INFO] Found custom language file: en_us.lang.php
Thu Dec 27 12:27:20 2018 [26627][-none-][INFO] Found extended language file: ru_ru.lang.ext.php
Thu Dec 27 12:27:20 2018 [26627][-none-][INFO] Found custom language file: ru_ru.lang.php
Thu Dec 27 12:27:23 2018 [26627][-none-][FATAL] [ERROR] [SuiteCRM] [API] [OAuth] Unable to generate private key
Thu Dec 27 12:27:23 2018 [26627][-none-][FATAL] [SuiteCRM] [API] [OAuth] Unable to generate private key
Thu Dec 27 12:27:23 2018 [26627][-none-][WARN] Invalid JSON API error object, invalid links
Thu Dec 27 12:27:23 2018 [26627][-none-][WARN] Invalid JSON API error object, invalid source
Thu Dec 27 12:27:23 2018 [26627][-none-][WARN] Invalid JSON API error object, invalid source
Thu Dec 27 12:27:23 2018 [26627][-none-][DEBUG] Hook called: ::server_round_trip
Thu Dec 27 12:27:23 2018 [26627][-none-][DEBUG] Calling MySQLi::disconnect()
Can someone, pls, direct me further - what I’ve missed? Where to look?