• Resolved cosmins

    (@cosmins)


    Hey guys,

    For some reason adding a redirection through such a link: https://smartstars.ro/wp-json/redirection/v1/redirect simply doesn’t work – the response shows all redirections but doesn’t add them.

    The body payload is:

    {“id”:0,”url”:”/test”,”title”:””,”match_data”:{“source”:{“flag_regex”:false,”flag_trailing”:true,”flag_case”:true,”flag_query”:”exact”},”options”:{}},”match_type”:”url”,”action_type”:”url”,”position”:0,”group_id”:1,”action_code”:301,”action_data”:{“url”:”https://google.com”}}

    So I get a 200 response but it’s not adding the new redirect. How could I debug it? Am I missing smth?

    Thank you!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley

    (@johnny5)

    You can find the developer documentation here:

    https://redirection.me/developer/rest-api/

    You can also see what the plugin itself is doing in requests – it uses the API.

    Thread Starter cosmins

    (@cosmins)

    I’ve been taking the same body params as what the plugin uses but I don’t get the same results – with the plugin I get it inserted while through the API I only get it to show the items and not the actual record added.

    Also I’m authentificating via Application Passwords, could this be the cause somehow?

    Plugin Author John Godley

    (@johnny5)

    The plugin uses the standard WordPress REST API and does no authentication itself – this is all provided by WordPress. I cannot say if there is anything else you need to do for application passwords and this is not something the plugin is involved with.

    If you make an identical request to the plugin then you will get an identical result. If you don’t then your request is not the same.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add redirection via API’ is closed to new replies.