Getting error 401 when accessing JIRA API (OAuth 1.0)

Hello, I am facing some 401 errors when accessing JIRA REST API from a custom PHP Laravel APP.

root@32cde58b717d:/var/www/app# php artisan company:import-jira-tasks
2023-04-28 07:46:58 Importing from Jira…
[2023-04-28 19:46:58] production.ERROR: Guzzle\Http\Exception\ClientErrorResponseException [0] : /var/www/app/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php [Line 43] => Client error response [status code] 401 [reason phrase] Unauthorized [url] mydomain.atlassian.net/rest/api/3/search?fields=parent%2Cproject%2Csummary%2Cdescription%2Ccustomfield_10022%2Ccustomfield_10802%2Ccustomfield_10800%2Cresolutiondate%2Ccreated%2Cchangelog%2Ccustomfield_10809%2Ccustomfield_10017%2Cstatus%2Cassignee%2Cissuetype%2Cattachment%2Creporter&expand=changelog&startAt=0&maxResults=100

[Guzzle\Http\Exception\ClientErrorResponseException]
Client error response
[status code] 401
[reason phrase] Unauthorized
root@32cde58b717d:/var/www/app#

After reading this documentation [developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication] I was able to access it from my machine using:
java -jar OAuthTutorialClient-1.0.jar request [url]

THen I reproduced all steps on my VPS (environment variables) to use new tokens and CERT but now I am getting this error:

[ErrorException]
openssl_sign(): supplied key param cannot be coerced into a private key

Can anyone help me?

Thanks.
Ricardo

Hi @RicardoSouza ,

Welcome to the Atlassian Developer Community.

Unfortunately, I don’t think you’ve provided enough information about how your making the request. Are you able to provide a simplified version of your source code that demonstrates the issue? If so, I think you will have a better chance of someone helping you out.

Regards,
Dugald