• Resolved srroky4

    (@srroky4)


    Hello, I want to integrate nextend social login in my app with the rest API. I am clear about how to log in user but I am not clear about how to register a user if he is not registered. in your docs, there was said that to use WordPress rest API to registered users. How can I register a user with the social account by WordPress rest API?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @srroky4

    As the official documentation mentions:

    you can create users over the WordPress REST API by sending a POST request to the /wp-json/wp/v2/users endpoint of your site.

    Please note that we can not provide support for custom coding or problems caused by custom codes, but maybe this topic can help you in achieving your goals:

    Best regards,
    Laszlo.

    Thread Starter srroky4

    (@srroky4)

    Hello, I can create user with wordpress api. But there need username & password. But i want to create user with social media token.

    Plugin Support Laszlo

    (@laszloszalvak)

    Hi @srroky4

    When the registration is done by the normal registration flow of Nextend Social Login, we also create a normal WordPress account and we linked the social media account to the created account.

    This means you will also need to create a regular WordPress account over the WordPress REST API as mentioned above and after that you could link the social media account to it, as it is described in the “Handling the Login / Registration process” section of our documentation:

    To clarify what you can use our REST API for:
    The REST API of Nextend Social Login can be used only for checking if there is WordPress account already linked to the currently used social media account or not. If there is then our REST API can return the User ID.
    So our REST API won’t handle the login / registration process itself, as you need to implement those with custom coding.

    Best regards,
    Laszlo.

    Thread Starter srroky4

    (@srroky4)

    I got facebook user id when user login. but api was asking for user access token according to document. How can i get this. is access token or user id same?

    Plugin Support Laszlo

    (@laszloszalvak)

    Hi @srroky4

    The access token is basically a credential, that allows you to make API requests in the name of the user. You can usually get it after the user authorized your App.

    And the Facebook User ID is a unique string, that identifies each user within the App. You can get this data over the API by using the access token.

    If you managed to get the User ID then I assume you have already managed to get an access token as well, and you need to post that to our endpoint in the format that our documentation mentions:

    If you are still not sure what an access token is, then please note that this part is out of the scope of Nextend Social Login, but in the official Facebook documentation you can find more information about it and the way you can request one:

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to register with social account with rest api’ is closed to new replies.