Make a code that signs the web app in
POST
/api/v1/me/web-link
const url = 'http://localhost:8080/api/v1/me/web-link';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/me/web-link \ --header 'Authorization: Bearer <token>'An app opens the Chek web app with this code in its link, so the person is signed in there without typing a password and the session token never appears in a URL. The code works once, for a minute.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The code.
Media typeapplication/json
object
code
required
string
expiresIn
required
Seconds until the code stops working.
integer
Example generated
{ "code": "example", "expiresIn": 1}The request has no valid session token.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}Too many codes and sign-ins are waiting (too_many_sign_ins); try again in a few minutes.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}