• Resolved kumarg2161

    (@kumarg2161)


    Getting the following error – “401: Invalid HTTP Method” on calling the Register API.

    I am passing the FCM Instance Id for the parameter “token” and Android as the value for the parameter “os”, as mentioned in the documentation.

    Could you please point out as to what is going wrong and why the API call is failing?

    [P.S. The server is nginx]

    • This topic was modified 7 years, 1 month ago by kumarg2161.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Delite Studio

    (@delitestudio)

    Hello,

    please read our FAQs:

    When I call an API the server returns 401 Invalid HTTP method. What should I do?

    As outlined in the documentation some APIs must be called using the POST HTTP method (e.g. the Register API) and other using the GET HTTP method (e.g. the Posts API list). More info here.
    If you are sure you have used the correct HTTP method be sure to check the settings of your web server. In particular, some users have reported that nginx has different URL mapping rules than Apache (see above).

    Thread Starter kumarg2161

    (@kumarg2161)

    Hi,

    Could you please outline as to what configurations/settings needs to be added to the server. Also, are there any other possible reasons for this issue, because i confirmed with the team who manages the web server and they have assured that the configuration listed in the FAQ section (related to the nginx server configuration) is already present.

    Thanks.

    Thread Starter kumarg2161

    (@kumarg2161)

    Thanks, its working now. They had not added the config earlier.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“401: Invalid HTTP Method” error on Register API call’ is closed to new replies.