Call a url when user get reward with Channel Points

even if I activate the channel points, it doesn’t work, logging in with this murilo_rt account or another, but the app belongs to this user_id… can I quickly activate the points and you test again?

No as I don’t have murilo_rt access token for the API.

All I did was follow the basic checks to see what the fault could be.

To use the channel points API requires the streamers access token

with the needed scopes of the endpoints you are calling, so for https://api.twitch.tv/helix/channel_points/custom_rewards/redemptions that is channel:read:redemptions, which does appear to be in your <a href

And make sure you are calling using murilo_rt

Provided broadcaster_id must match the user_id in the user OAuth token.

Whom owns the ClientID/App is irrelevant it’s all about the oAuth tokens that get created.

Edit: I just tested everything end to end on the Twitch CLI against my own channel operating as me and found it working as expected.

Only thing I note is your call

Omits a the require status param, but that would raise a

{
  "error": "Bad Request",
  "message": "missing redemption status",
  "status": 400
}

not a token/user error

when i activate the channel points, the error is, logged with murilo_rt

{“error”:“Forbidden”,“status”:403,“message”:“custom reward was created by a different client_id or channel points are not available for the broadcaster”}

my intention is, the murilo_rt channel will create rewards, whoever watches and wins them will log into my site to verify these rewards, that is, I want to request the login of the third party who won the reward, their own redemptions, can i?

Sure but in the API you can ONLY talk to rewards that your clientID created

The problem you are having is that the reward you are trying to talk to was created in the dashboard (or another clientID)

You cannot manage dashboard created custom rewards (including fetching redemptions) via the API

EventSub (and pubsub) however, will notify of all custom rewards.

Then either

Then murilo_rt will use yoru App to create the rewards.

Or

You use EventSub or PubSub to consume redeems in real time.

hello, i created the custom reward by the api:

import requests
	headers = {
		'Client-Id': 'vdevjpxyrzii52pqjuomsvomixeazr',
		'Authorization': 'Bearer %s' % session.access_token,
		'Content-Type': 'application/json;'
	}
	payload = {
		'title' : 'teste api aureo',
		'cost' : 100
	}
	url = 'https://api.twitch.tv/helix/channel_points/custom_rewards?broadcaster_id=168327867'
	r = requests.post(url,headers=headers,params=payload)

and the error is the same when i try to get the redemptions, i think:

{"error":"Unauthorized","status":401,"message":"incorrect user authorization"}

OMG, I confused redemptions with reward and was using id with reward id, it worked, ignore.

hello, after creating the reward with the API, I was able to access the redemptions when using the channel that owns the app (murilo_rt), but when using another twitch in my app, I get the error

{"error":"Unauthorized","status":401,"message":"incorrect user authorization"}

I want my subscribers to access my app, log in to twitch and see their redemptions, is it possible?

No the users token isn’t valid to call the API only the broadcasters token is

So you would store redeems (source from the API/Eventsub via the streamers token) in a database and access the database instead.

There is no API to get redeems on the users behalf

Only the broadcasters

Ok, I get it.

and there is, for example, a way for me to build a webhook that communicates with my site, I believe it would be easier

my subscriber requests the reward and twitch automatically sends a POST to my URL containing the redemption information?

Eventsub: EventSub | Twitch Developers

hello, with this sample i can get redemptions off OTHERS users notified? like my subscribers make a redemption of a reward in my channel, this sample will notify me?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.