Back

Doubt, regarding `Create Phone Session` API `Response Object`.

  • 0
  • Users
  • Accounts
Vedsaga
15 Mar, 2023, 08:23

Create Phone session api, /v1/account/sessions/phone return Token Object. In that one key which is mentioned is that secret .

And description of that key is stated as

Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. Can I get more clearification on this? Also, If I am not wrong /v1/account/sessions/phone can only work if in the .env file I have put token of SMS provider right? Without that we can not call this API? If I am not wrong. https://appwrite.io/docs/models/token

TL;DR
User has a doubt regarding the `Create Phone Session` API and the `Response Object`. They are unsure about what they are trying to implement. The support team explains that if an API key is used, the response will contain the key, otherwise it will be empty. They also mention the need for an environment variable for phone verification and address the use of the `/v1/account/sessions/phone` API. They clarify that the API requires the token of the SMS provider to be specified in the `.env` file in order to call it. No solution is provided in the thread.
joeyouss
15 Mar, 2023, 08:38

Hi πŸ‘‹

joeyouss
15 Mar, 2023, 08:46

Let me have a look quickly

joeyouss
15 Mar, 2023, 09:09

If you use an API key, then the response will contain the key, if not then it will be empty. And yes you are right about the environment variable: https://appwrite.io/docs/environment-variables#phone. You will need it to call the API else there will be an error thrown.

Vedsaga
15 Mar, 2023, 13:13

thank you, so for now I guess kinda thinking to go with this arch based on API that are aval. Any thought?

Vedsaga
15 Mar, 2023, 13:14
Vedsaga
15 Mar, 2023, 13:14
joeyouss
15 Mar, 2023, 14:24

Can I understand what you are trying to implement?

Vedsaga
16 Mar, 2023, 01:07

actually, this represent registation flow using phone number,

Vedsaga
16 Mar, 2023, 01:07

this represent phone verfication flow. In of the flow I was thinking to use Function

Vedsaga
16 Mar, 2023, 01:08

cc @joeyouss

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more