S
S
svsova2020-02-19 16:50:58
PHP
svsova, 2020-02-19 16:50:58

What should be the value of the parameters for Authorization OK?

Hello!
I am doing authorization for OK and I would like to clarify 2 points.

1. Interested in the value of the state parameter. Should it equal 'state'? Or what should it matter?

2. How to correctly specify the parameter with rights to get the user's email?
'grant_type' => 'authorization_code' - gives all info except email
tried
'grant_type' => 'EMAIL' - doesn't work, writes wrong permissions ("error_description":"Invalid grant type","error":"invalid_grant")

Permissions for the application they gave me.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nokimaro, 2020-02-20
@svsova

1. state - any value, this is extra. mechanism for protecting oauth
2. grant_type - authorization_code
3. to get email, you need to explicitly request access to it via scope=GET_EMAIL https://apiok.ru/en/ext/oauth/permissions

S
svsova, 2020-02-20
@svsova

Earned! Specified parameter
... &scope=GET_EMAIL ...
Prior to this, the parameter was empty.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question