Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to call API in laravel which include the OAuth key and secret

I want to call external API from laravel HttpClient. I’m not understanding how to pass the following authorization keys of OAuth 1.0.

1. Signature Method
2. Consumer Key
3. Consumer Secret
4. Access Token
5. Token Secret
6. Version
7. Realm

is this the right way?

$response = Http::withHeaders([
    'Signature Method' => 'Signature Method',
    'Consumer Key' => 'Consumer Key'
])->post('http://test.com/users', [
    'name' => 'Taylor',
]);

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thank you

>Solution :

You can use laravels own HTTP client or you can also use CURL
the simplest workaround is you can simply call the request in the Postman and then there is a section in postman where you can find the request center image description hereode
there you can simply copy the request code and post it.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading