本文介绍了如何使用Getstream Rest API在Postman中获得响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在尝试实现流聊天Rest API(通过以下链接:)由GetStream提供。因此,我通过以下方式放置了baseUrl和期望的标头:

I am trying to implement Stream chat Rest APIs ( by following this link : https://getstream.io/chat/docs_rest ) provided by GetStream. So, I put the baseUrl and expected headers in following ways :

Request Url     : https://chat-us-east-1.stream-io-api.com/channeltypes

这些是我在标题部分中输入的值邮递员的身份:

These are the values which I put in Headers section of Postman :

Authorization   : <Getstream token (generating from setUser function) from backend>
Stream-Auth-Type: jwt
api_key         : <Getstream API key>

但是我在Postman上点击API时收到此响应:

But I am getting this response on hitting API on Postman:

在使用 Getstream的其他API 时,我找不到我所缺少或做错的事情。请提出建议并帮助解决此问题。

I am unable to find out what I am missing or doing wrong in using the Rest API of Getstream. Please suggest and help in fixing this issue.

推荐答案

如错误消息中所述:

服务器端身份验证。

使用授权时:<从后端Getstream令牌(从setUser函数生成)> ,这是针对客户端的。

When you use Authorization: <Getstream token (generating from setUser function) from backend>, this is for client-side.

您需要在令牌中使用您的机密,以启用服务器端并在此终结点进行测试。

You need to use your secret in the token to enable server-side and to gueary in this endpoint.

这篇关于如何使用Getstream Rest API在Postman中获得响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 08:18