Pinterest redirect_uri 查询参数 [英] Pinterest redirect_uri query parameter

查看:43
本文介绍了Pinterest redirect_uri 查询参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Pinterest 应用程序中,我已将重定向 URI 设置为 https://my.site.com/pinterest/callback.在身份验证后重定向回我的网站时,我附加了一个 sessionid,因此查询变为 https://my.site.com/pinterest/callback?sessionid=.这似乎不起作用,因为我得到 <块引用>

提供的redirect_uri

在像 Instagram 这样的其他 api 中,这是可能的.有人能帮忙吗?非常感谢!

解决方案

我已经坚持了两天.基本上,Pinterest 不像其他网站那样支持自定义参数,对于 Pinterest,您需要提供 EXACT 回调 url,并且它必须使用 https 而不是 http,如果你需要传递自定义参数,它们应该在 state 参数中.

来自 Pinterest 文档

<块引用>

state:您定义的值.这可用于确保重定向回您的网站或应用没有被欺骗.

请参阅 https://developers.pinterest 上的身份验证部分.com/docs/api/overview/

In my Pinterest app I have set the Redirect URI to https://my.site.com/pinterest/callback. When doing the redirection after authentication back to my site I append a sessionid so the query becomes https://my.site.com/pinterest/callback?sessionid=<string>. This doesn't seem to work as I get

The provided redirect_uri https://my.site.com/pinterest/callback?sessionId=YA6udv2FrdjjV8juij3U5oIBBP6RoEQWWUFNzSHKaHGGf3jRq10uJ2A0-R-eYB8LLwiBTbESEdGzMY0fhYI8d7gOe3kOoPuPS6c-mowaaJBDv0J8D2I does not match any of the registered redirect URIs."

In other apis like the Instagram one this is possible. Can anyone help with this? Thanks a bunch!

解决方案

I have been stucking with this for two days. Basically, Pinterest doesn't support custom parameters like other websites do, for Pinterest you need to provide the EXACT callback url and it has to use https not http, and if you need to pass custom parameters they should be in state parameter.

From Pinterest docs

state: A value you define. This can be used to make sure that the redirect back to your site or app wasn’t spoofed.

See Authentication section at https://developers.pinterest.com/docs/api/overview/

这篇关于Pinterest redirect_uri 查询参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆