A
A
Alexey2018-04-05 23:13:57
PHP
Alexey, 2018-04-05 23:13:57

How to get token from aws.amazon.com in PHP?

Hello!
Working with AWS Cognito
There are two options:

Client ID: zaq1xsw2cde3vfr4bgt5nhy6mju7
Pool ID: us-east-1_1qaz2wsx3edc

How to get the current token array in PHP (no need to refresh)?
I know that the response will be JSON in the format
{
   "AuthenticationResult": { 
     ...
      "IdToken": "string",
....
}

But here's how to get it using only cURL? Or do I need to install some libraries?
If it’s not difficult, then show a simple example, otherwise in Google there are only examples with a serious work of the service and you have to put a whole package of different classes there, and I just need to get one token knowing the two necessary parameters.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question